Emoji Status: Fix user emoji status opening (#5991)
This commit is contained in:
parent
e1fd770402
commit
ad4e496446
@ -26,6 +26,7 @@ import {
|
||||
selectIsChatWithSelf,
|
||||
selectIsInSelectMode,
|
||||
selectIsRightColumnShown,
|
||||
selectPeer,
|
||||
selectPinnedIds,
|
||||
selectScheduledIds,
|
||||
selectTabState,
|
||||
@ -377,6 +378,7 @@ export default memo(withGlobal<OwnProps>(
|
||||
isLeftColumnShown, shouldSkipHistoryAnimations, audioPlayer, messageLists,
|
||||
} = selectTabState(global);
|
||||
const chat = selectChat(global, chatId);
|
||||
const peer = selectPeer(global, chatId);
|
||||
|
||||
const { chatId: audioChatId, messageId: audioMessageId } = audioPlayer;
|
||||
const audioMessage = audioChatId && audioMessageId
|
||||
@ -397,7 +399,7 @@ export default memo(withGlobal<OwnProps>(
|
||||
|
||||
const typingStatus = selectThreadParam(global, chatId, threadId, 'typingStatus');
|
||||
|
||||
const emojiStatus = chat?.emojiStatus;
|
||||
const emojiStatus = peer?.emojiStatus;
|
||||
const emojiStatusSticker = emojiStatus && global.customEmojis.byId[emojiStatus.documentId];
|
||||
const emojiStatusSlug = emojiStatus?.type === 'collectible' ? emojiStatus.slug : undefined;
|
||||
|
||||
|
||||
@ -7,6 +7,7 @@ import { addActionHandler, getGlobal, setGlobal } from '../../index';
|
||||
import {
|
||||
deleteContact,
|
||||
replaceUserStatuses,
|
||||
updateChat,
|
||||
updatePeerStoriesHidden,
|
||||
updateUser,
|
||||
updateUserFullInfo,
|
||||
@ -74,7 +75,9 @@ addActionHandler('apiUpdate', (global, actions, update): ActionReturnType => {
|
||||
}
|
||||
|
||||
case 'updateUserEmojiStatus': {
|
||||
return updateUser(global, update.userId, { emojiStatus: update.emojiStatus });
|
||||
global = updateUser(global, update.userId, { emojiStatus: update.emojiStatus });
|
||||
global = updateChat(global, update.userId, { emojiStatus: update.emojiStatus });
|
||||
return global;
|
||||
}
|
||||
|
||||
case 'updateUserStatus': {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user