Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down