From 5b503d32cc1929f904ca5323b18f819d37416220 Mon Sep 17 00:00:00 2001 From: William Grant Date: Thu, 18 May 2023 17:17:41 +1000 Subject: [PATCH] fix: use isUsAnySogsFromCache instead of getOurPubKeyStrFromCache in useQuoteAuthorName this gives proper blinded key support --- ts/hooks/useParamSelector.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ts/hooks/useParamSelector.ts b/ts/hooks/useParamSelector.ts index a3c1e6940..526e71c82 100644 --- a/ts/hooks/useParamSelector.ts +++ b/ts/hooks/useParamSelector.ts @@ -5,6 +5,7 @@ import { PubKey } from '../session/types'; import { UserUtils } from '../session/utils'; import { StateType } from '../state/reducer'; import { getMessageReactsProps } from '../state/selectors/conversations'; +import { isUsAnySogsFromCache } from '../session/apis/open_group_api/sogsv3/knownBlindedkeys'; export function useAvatarPath(convoId: string | undefined) { const convoProps = useConversationPropsById(convoId); @@ -186,7 +187,7 @@ export function useMessageReactsPropsById(messageId?: string) { export function useQuoteAuthorName(authorId?: string) { const convoProps = useConversationPropsById(authorId); - return authorId === UserUtils.getOurPubKeyStrFromCache() + return authorId && isUsAnySogsFromCache(authorId) ? window.i18n('you') : convoProps?.nickname || convoProps?.isPrivate ? convoProps?.displayNameInProfile