diff options
Diffstat (limited to 'webapp/actions/webrtc_actions.jsx')
-rw-r--r-- | webapp/actions/webrtc_actions.jsx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/webapp/actions/webrtc_actions.jsx b/webapp/actions/webrtc_actions.jsx new file mode 100644 index 000000000..444eee241 --- /dev/null +++ b/webapp/actions/webrtc_actions.jsx @@ -0,0 +1,20 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import AppDispatcher from 'dispatcher/app_dispatcher.jsx'; +import {WebrtcActionTypes} from 'utils/constants.jsx'; + +export function initWebrtc(userId, isCalling) { + AppDispatcher.handleServerAction({ + type: WebrtcActionTypes.INITIALIZE, + user_id: userId, + is_calling: isCalling + }); +} + +export function handle(message) { + AppDispatcher.handleServerAction({ + type: message.action, + message + }); +} |