Reactions: Fix adding new custom reaction (#5111)
This commit is contained in:
parent
d51404cf8d
commit
e614d816f8
@ -7,7 +7,6 @@ import type {
|
|||||||
ApiMessage,
|
ApiMessage,
|
||||||
ApiMessageEntity,
|
ApiMessageEntity,
|
||||||
ApiReaction,
|
ApiReaction,
|
||||||
ApiReactionCustomEmoji,
|
|
||||||
ApiReactionWithPaid,
|
ApiReactionWithPaid,
|
||||||
ApiSticker,
|
ApiSticker,
|
||||||
ApiStory,
|
ApiStory,
|
||||||
@ -119,9 +118,9 @@ const ReactionPicker: FC<OwnProps & StateProps> = ({
|
|||||||
if (!renderedChatId || !renderedMessageId) {
|
if (!renderedChatId || !renderedMessageId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const reaction = sticker.isCustomEmoji
|
const reaction: ApiReaction = sticker.isCustomEmoji
|
||||||
? { documentId: sticker.id } as ApiReactionCustomEmoji
|
? { type: 'custom', documentId: sticker.id }
|
||||||
: { emoticon: sticker.emoji } as ApiReaction;
|
: { type: 'emoji', emoticon: sticker.emoji! };
|
||||||
|
|
||||||
toggleReaction({
|
toggleReaction({
|
||||||
chatId: renderedChatId, messageId: renderedMessageId, reaction, shouldAddToRecent: true,
|
chatId: renderedChatId, messageId: renderedMessageId, reaction, shouldAddToRecent: true,
|
||||||
|
|||||||
@ -116,7 +116,7 @@ const Reactions: FC<OwnProps> = ({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
updateMiddleSearch({ chatId: message.chatId, threadId, update: { savedTag: reaction as ApiReaction } });
|
updateMiddleSearch({ chatId: message.chatId, threadId, update: { savedTag: reaction } });
|
||||||
performMiddleSearch({ chatId: message.chatId, threadId });
|
performMiddleSearch({ chatId: message.chatId, threadId });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user