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