forked from Ivasoft/mattermost-mobile
* 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
21 lines
653 B
JavaScript
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,
|
|
},
|
|
});
|
|
};
|
|
}
|