Skip to content

Commit

Permalink
rename temp variable
Browse files Browse the repository at this point in the history
  • Loading branch information
martgil committed Jun 30, 2023
1 parent 0830dfb commit 60b7475
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extension/js/common/message-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,8 @@ export class MessageRenderer {
private clipMessageIfLimitExceeds = (decryptedContent: string) => {
const maxDecryptedContentLength = 100000;
const base64InlineImageRegex = /<img src="data:image\/[^;]+;base64,[^"]+" name="(\w+\.\w+)" title="[^"]+">/;
const temporaryContent = decryptedContent.replace(base64InlineImageRegex, '');
if (temporaryContent.length > maxDecryptedContentLength) {
const content = decryptedContent.replace(base64InlineImageRegex, '');
if (content.length > maxDecryptedContentLength) {
return decryptedContent.substring(0, maxDecryptedContentLength) + ' [clipped - message too large]';
}
return decryptedContent;
Expand Down

0 comments on commit 60b7475

Please sign in to comment.