fix: use isUsAnySogsFromCache instead of getOurPubKeyStrFromCache in useQuoteAuthorName

this gives proper blinded key support
pull/2757/head
William Grant 2 years ago
parent ca6463da02
commit 5b503d32cc

@ -5,6 +5,7 @@ import { PubKey } from '../session/types';
import { UserUtils } from '../session/utils'; import { UserUtils } from '../session/utils';
import { StateType } from '../state/reducer'; import { StateType } from '../state/reducer';
import { getMessageReactsProps } from '../state/selectors/conversations'; import { getMessageReactsProps } from '../state/selectors/conversations';
import { isUsAnySogsFromCache } from '../session/apis/open_group_api/sogsv3/knownBlindedkeys';
export function useAvatarPath(convoId: string | undefined) { export function useAvatarPath(convoId: string | undefined) {
const convoProps = useConversationPropsById(convoId); const convoProps = useConversationPropsById(convoId);
@ -186,7 +187,7 @@ export function useMessageReactsPropsById(messageId?: string) {
export function useQuoteAuthorName(authorId?: string) { export function useQuoteAuthorName(authorId?: string) {
const convoProps = useConversationPropsById(authorId); const convoProps = useConversationPropsById(authorId);
return authorId === UserUtils.getOurPubKeyStrFromCache() return authorId && isUsAnySogsFromCache(authorId)
? window.i18n('you') ? window.i18n('you')
: convoProps?.nickname || convoProps?.isPrivate : convoProps?.nickname || convoProps?.isPrivate
? convoProps?.displayNameInProfile ? convoProps?.displayNameInProfile

Loading…
Cancel
Save