forked from Ivasoft/mattermost-mobile
* Load team member and roles in the WebSocket event * Split WebSocket actions and events into multiple files
14 lines
596 B
TypeScript
14 lines
596 B
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import {IntegrationTypes} from '@mm-redux/action_types';
|
|
import {ActionResult, DispatchFunc} from '@mm-redux/types/actions';
|
|
import {WebSocketMessage} from '@mm-redux/types/websocket';
|
|
|
|
export function handleOpenDialogEvent(msg: WebSocketMessage) {
|
|
return (dispatch: DispatchFunc): ActionResult => {
|
|
const data = (msg.data && msg.data.dialog) || {};
|
|
dispatch({type: IntegrationTypes.RECEIVED_DIALOG, data: JSON.parse(data)});
|
|
return {data: true};
|
|
};
|
|
} |