Files
mattermost-mobile/app/actions/views/user.js
Elias Nahum a0a1fa28ce MM-13896 Sync channel as read between clients (including opening Push Notifications) (#2548)
* Update mattermost-redux to use latest WS changes

* Properly mark channel as read, keep the new message indicator, and fix push notification flow

* unneeded parameter in setCurrentUserStatusOffline

Co-Authored-By: enahum <nahumhbl@gmail.com>

* Feedback review

* Update mm-redux ref
2019-02-16 15:09:22 -03:00

21 lines
653 B
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {UserTypes} from 'mattermost-redux/action_types';
import {General} from 'mattermost-redux/constants';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';
export function setCurrentUserStatusOffline() {
return (dispatch, getState) => {
const currentUserId = getCurrentUserId(getState());
return dispatch({
type: UserTypes.RECEIVED_STATUS,
data: {
user_id: currentUserId,
status: General.OFFLINE,
},
});
};
}