mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-28 04:13:18 +01:00
Avoid logging an error when weakly referenced attachment is missing
This commit is contained in:
@@ -35,6 +35,7 @@ export function getLocalAttachmentUrl(
|
||||
| 'path'
|
||||
| 'size'
|
||||
| 'version'
|
||||
| 'copied'
|
||||
>
|
||||
>,
|
||||
{
|
||||
@@ -106,5 +107,10 @@ export function getLocalAttachmentUrl(
|
||||
url.searchParams.set('chunkSize', attachment.chunkSize.toString());
|
||||
}
|
||||
|
||||
// For weak references (e.g. copied quotes) don't error if path is missing
|
||||
if (attachment.copied) {
|
||||
url.searchParams.set('weakReference', '1');
|
||||
}
|
||||
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user