Fix Clear All status icons action
The problem was caused by a wrong parameter being passed down to the function that set the emoji status for the user close #7924
This commit is contained in:
parent
35399bde6d
commit
132609414a
@ -27,9 +27,7 @@ export default function handleEmojiStatus({ body }, meetingId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (numChanged) {
|
if (numChanged) {
|
||||||
Logger.info(`Assigned user emoji status${
|
Logger.info(`Assigned user emoji status ${emoji} id=${userId} meeting=${meetingId}`);
|
||||||
emoji} id=${userId} meeting=${meetingId}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -368,12 +368,12 @@ const normalizeEmojiName = emoji => (
|
|||||||
emoji in EMOJI_STATUSES ? EMOJI_STATUSES[emoji] : emoji
|
emoji in EMOJI_STATUSES ? EMOJI_STATUSES[emoji] : emoji
|
||||||
);
|
);
|
||||||
|
|
||||||
const setEmojiStatus = (data) => {
|
const setEmojiStatus = (userId, emoji) => {
|
||||||
const statusAvailable = (Object.keys(EMOJI_STATUSES).includes(data));
|
const statusAvailable = (Object.keys(EMOJI_STATUSES).includes(emoji));
|
||||||
|
|
||||||
return statusAvailable
|
return statusAvailable
|
||||||
? makeCall('setEmojiStatus', Auth.userID, data)
|
? makeCall('setEmojiStatus', Auth.userID, emoji)
|
||||||
: makeCall('setEmojiStatus', data, 'none');
|
: makeCall('setEmojiStatus', userId, 'none');
|
||||||
};
|
};
|
||||||
|
|
||||||
const assignPresenter = (userId) => { makeCall('assignPresenter', userId); };
|
const assignPresenter = (userId) => { makeCall('assignPresenter', userId); };
|
||||||
|
@ -272,7 +272,7 @@ class UserDropdown extends PureComponent {
|
|||||||
statuses.map(status => actions.push(this.makeDropdownItem(
|
statuses.map(status => actions.push(this.makeDropdownItem(
|
||||||
status,
|
status,
|
||||||
intl.formatMessage({ id: `app.actionsBar.emojiMenu.${status}Label` }),
|
intl.formatMessage({ id: `app.actionsBar.emojiMenu.${status}Label` }),
|
||||||
() => { handleEmojiChange(status); this.resetMenuState(); },
|
() => { handleEmojiChange(user.id, status); this.resetMenuState(); },
|
||||||
getEmojiList[status],
|
getEmojiList[status],
|
||||||
)));
|
)));
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ const UserOptionsContainer = withTracker((props) => {
|
|||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const toggleStatus = () => {
|
const toggleStatus = () => {
|
||||||
users.forEach(id => setEmojiStatus(id, 'none'));
|
users.forEach(user => setEmojiStatus(user.userId, 'none'));
|
||||||
notify(
|
notify(
|
||||||
intl.formatMessage(intlMessages.clearStatusMessage), 'info', 'clear_status',
|
intl.formatMessage(intlMessages.clearStatusMessage), 'info', 'clear_status',
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user