diff --git a/ts/components/conversation/message/message-content/MessageAvatar.tsx b/ts/components/conversation/message/message-content/MessageAvatar.tsx index 741606859e..413a24265f 100644 --- a/ts/components/conversation/message/message-content/MessageAvatar.tsx +++ b/ts/components/conversation/message/message-content/MessageAvatar.tsx @@ -65,12 +65,12 @@ export const MessageAvatar = (props: Props) => { } const userName = authorName || authorProfileName || sender; + const convoWithSender = getConversationController().get(sender); const onMessageAvatarClick = useCallback(async () => { if (isPublic && !PubKey.hasBlindedPrefix(sender)) { // public chat but session id not blinded. disable showing user details if we do not have an active convo with that user. // an unactive convo with that user means that we never chatted with that id directyly, but only through a sogs - const convoWithSender = getConversationController().get(sender); if (!convoWithSender || !convoWithSender.get('active_at')) { // for some time, we might still get some unblinded messages, as in message sent unblinded because // * older clients still send unblinded message and those are allowed by sogs if they doesn't enforce blinding @@ -101,6 +101,20 @@ export const MessageAvatar = (props: Props) => { ); privateConvoToOpen = foundRealSessionId || privateConvoToOpen; + + if (foundRealSessionId && convoWithSender.get('active_at')) { + // We know this user's real id and have an active conversation with + // him. Go to it. + await getConversationController() + .get(privateConvoToOpen) + .setOriginConversationID(selectedConvoKey); + + await openConversationWithMessages({ conversationKey: privateConvoToOpen, messageId: null }); + + return; + } + // Public and blinded key for this message. Fall through to asking if we + // should start a conversation, which will send SOGS blinded message request. } await getConversationController()