diff --git a/ts/components/conversation/message/message-content/quote/QuoteAuthor.tsx b/ts/components/conversation/message/message-content/quote/QuoteAuthor.tsx index d724b1203..cb5ede16e 100644 --- a/ts/components/conversation/message/message-content/quote/QuoteAuthor.tsx +++ b/ts/components/conversation/message/message-content/quote/QuoteAuthor.tsx @@ -29,7 +29,7 @@ export const QuoteAuthor = (props: QuoteAuthorProps) => { const { author, isIncoming } = props; const isPublic = useSelectedIsPublic(); - const authorName = useQuoteAuthorName(author); + const { authorName, isMe } = useQuoteAuthorName(author); if (!author || !authorName) { return null; @@ -41,7 +41,7 @@ export const QuoteAuthor = (props: QuoteAuthorProps) => { pubkey={PubKey.shorten(author)} name={authorName} compact={true} - shouldShowPubkey={Boolean(authorName && isPublic)} + shouldShowPubkey={Boolean(authorName && !isMe && isPublic)} /> ); diff --git a/ts/components/leftpane/LeftPaneMessageSection.tsx b/ts/components/leftpane/LeftPaneMessageSection.tsx index 95ef19647..1af354f24 100644 --- a/ts/components/leftpane/LeftPaneMessageSection.tsx +++ b/ts/components/leftpane/LeftPaneMessageSection.tsx @@ -112,6 +112,7 @@ export class LeftPaneMessageSection extends React.Component { rowRenderer={this.renderRow} width={width} autoHeight={false} + conversationIds={conversationIds} /> )} diff --git a/ts/hooks/useParamSelector.ts b/ts/hooks/useParamSelector.ts index 59e4411bf..a46bc4776 100644 --- a/ts/hooks/useParamSelector.ts +++ b/ts/hooks/useParamSelector.ts @@ -264,11 +264,17 @@ export function useIsTyping(conversationId?: string): boolean { return useConversationPropsById(conversationId)?.isTyping || false; } -export function useQuoteAuthorName(authorId?: string) { +export function useQuoteAuthorName( + authorId?: string +): { authorName: string | undefined; isMe: boolean } { const convoProps = useConversationPropsById(authorId); - return authorId && isUsAnySogsFromCache(authorId) + + const isMe = Boolean(authorId && isUsAnySogsFromCache(authorId)); + const authorName = isMe ? window.i18n('you') : convoProps?.nickname || convoProps?.isPrivate ? convoProps?.displayNameInProfile : undefined; + + return { authorName, isMe }; } diff --git a/ts/receiver/attachments.ts b/ts/receiver/attachments.ts index c7a58dc26..d4c16f52c 100644 --- a/ts/receiver/attachments.ts +++ b/ts/receiver/attachments.ts @@ -218,27 +218,27 @@ async function processQuoteAttachments( const isOpenGroupV2 = convo.isOpenGroupV2(); const openGroupV2Details = (isOpenGroupV2 && convo.toOpenGroupV2()) || undefined; - quote.attachments = await Promise.all( - quote.attachments.map(async (item: any, index: any) => { - // If we already have a path, then we copied this image from the quoted - // message and we don't need to download the attachment. - if (!item.thumbnail || item.thumbnail.path) { - return item; - } + for (let index = 0; index < quote.attachments.length; index++) { + // If we already have a path, then we copied this image from the quoted + // message and we don't need to download the attachment. + const attachment = quote.attachments[index]; - addedCount += 1; + if (!attachment.thumbnail || attachment.thumbnail.path) { + continue; + } - const thumbnail = await AttachmentDownloads.addJob(item.thumbnail, { - messageId: message.id, - type: 'quote', - index, - isOpenGroupV2, - openGroupV2Details, - }); + addedCount += 1; - return { ...item, thumbnail }; - }) - ); + const thumbnail = await AttachmentDownloads.addJob(attachment.thumbnail, { + messageId: message.id, + type: 'quote', + index, + isOpenGroupV2, + openGroupV2Details, + }); + + quote.attachments[index] = { ...attachment, thumbnail }; + } message.set({ quote }); diff --git a/ts/session/utils/job_runners/jobs/ConfigurationSyncJob.ts b/ts/session/utils/job_runners/jobs/ConfigurationSyncJob.ts index 0cef20c86..5fc60cbf9 100644 --- a/ts/session/utils/job_runners/jobs/ConfigurationSyncJob.ts +++ b/ts/session/utils/job_runners/jobs/ConfigurationSyncJob.ts @@ -20,7 +20,7 @@ import { ReleasedFeatures } from '../../../../util/releaseFeature'; import { allowOnlyOneAtATime } from '../../Promise'; import { isSignInByLinking } from '../../../../util/storage'; -const defaultMsBetweenRetries = 30000; // a long time between retries, to avoid running multiple jobs at the same time, when one was postponed at the same time as one already planned (5s) +const defaultMsBetweenRetries = 15000; // a long time between retries, to avoid running multiple jobs at the same time, when one was postponed at the same time as one already planned (5s) const defaultMaxAttempts = 2; /**