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