From d98700b17f95ccca11ae81bbf14187d4264cea52 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 14 Apr 2021 14:15:02 +1000 Subject: [PATCH] allow unpadding of attachments if needed currently, the padding of attachments is disabled behind a featureFlags --- preload.js | 1 + ts/components/UserDetailsDialog.tsx | 2 +- ts/session/utils/Attachments.ts | 7 ++++--- ts/session/utils/JobQueue.ts | 2 +- ts/window.d.ts | 1 + 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/preload.js b/preload.js index 2f250136d..24757e0d0 100644 --- a/preload.js +++ b/preload.js @@ -62,6 +62,7 @@ window.lokiFeatureFlags = { useFileOnionRequestsV2: true, // more compact encoding of files in response onionRequestHops: 3, useRequestEncryptionKeyPair: false, + padOutgoingAttachments: false, }; if ( diff --git a/ts/components/UserDetailsDialog.tsx b/ts/components/UserDetailsDialog.tsx index 70e4e0301..70276c53d 100644 --- a/ts/components/UserDetailsDialog.tsx +++ b/ts/components/UserDetailsDialog.tsx @@ -64,7 +64,7 @@ export class UserDetailsDialog extends React.Component { private renderAvatar() { const { avatarPath, pubkey, profileName } = this.props; const size = this.state.isEnlargedImageShown ? 300 : 80; - const userName = name || profileName || pubkey; + const userName = profileName || pubkey; return ( = (() => PromiseLike) | (() => ResultType); // TODO: This needs to replace js/modules/job_queue.js export class JobQueue { - private pending: Promise = Promise.resolve(); + private pending?: Promise = Promise.resolve(); private readonly jobs: Map> = new Map(); public has(id: string): boolean { diff --git a/ts/window.d.ts b/ts/window.d.ts index ea0eb1920..e3a1f6e1f 100644 --- a/ts/window.d.ts +++ b/ts/window.d.ts @@ -62,6 +62,7 @@ declare global { useFileOnionRequestsV2: boolean; onionRequestHops: number; useRequestEncryptionKeyPair: boolean; + padOutgoingAttachments: boolean; }; lokiFileServerAPI: LokiFileServerInstance; lokiMessageAPI: LokiMessageInterface;