diff --git a/ts/models/conversationAttributes.ts b/ts/models/conversationAttributes.ts index bc1427058..9d54661d3 100644 --- a/ts/models/conversationAttributes.ts +++ b/ts/models/conversationAttributes.ts @@ -102,7 +102,7 @@ export interface ConversationAttributes { markedAsUnread: boolean; // Force the conversation as unread even if all the messages are read. Used to highlight a conversation the user wants to check again later, synced. - blocksSogsMsgReqsTimestamp: number; // if that convo is a blinded one and that user denied be contacted through sogs, this field will be set to his latest message timestamp + blocksSogsMsgReqsTimestamp: number; // if the convo is blinded and the user has denied contact through sogs, this field be set to the user's latest message timestamp } /** diff --git a/ts/session/apis/open_group_api/sogsv3/sogsV3SendReaction.ts b/ts/session/apis/open_group_api/sogsv3/sogsV3SendReaction.ts index e5628febd..936b1e0c8 100644 --- a/ts/session/apis/open_group_api/sogsv3/sogsV3SendReaction.ts +++ b/ts/session/apis/open_group_api/sogsv3/sogsV3SendReaction.ts @@ -1,5 +1,5 @@ import { AbortSignal } from 'abort-controller'; -import { getEmojiDataFromNative } from 'emoji-mart'; +import { SearchIndex } from 'emoji-mart'; import { Data } from '../../../../data/data'; import { ConversationModel } from '../../../../models/conversation'; import { Action, OpenGroupReactionResponse, Reaction } from '../../../../types/Reaction'; @@ -68,9 +68,8 @@ export const sendSogsReactionOnionV4 = async ( // The SOGS endpoint supports any text input so we need to make sure we are sending a valid unicode emoji // for an invalid input we use https://emojipedia.org/frame-with-an-x/ as a replacement since it cannot rendered as an emoji but is valid unicode - // NOTE emoji-mart v5.2.2 types for getEmojiDataFromNative are broken // eslint-disable-next-line @typescript-eslint/await-thenable - const emoji = (await getEmojiDataFromNative(reaction.emoji)) ? reaction.emoji : '🖾'; + const emoji = (await SearchIndex.search(reaction.emoji)) ? reaction.emoji : '🖾'; const endpoint = `/room/${room}/reaction/${reaction.id}/${emoji}`; const method = reaction.action === Action.REACT ? 'PUT' : 'DELETE'; const serverPubkey = allValidRoomInfos[0].serverPublicKey;