mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-18 23:49:20 +01:00
Use protopiler for protocol buffers
Co-authored-by: Jamie Kyle <jamie@signal.org>
This commit is contained in:
@@ -15,6 +15,8 @@ import { canBeTranscoded } from './Attachment.std.js';
|
||||
import * as Errors from '../types/errors.std.js';
|
||||
import * as Bytes from '../Bytes.std.js';
|
||||
|
||||
import { toNumber } from './toNumber.std.js';
|
||||
|
||||
const log = createLogger('attachments');
|
||||
|
||||
// All outgoing images go through handleImageAttachment before being sent and thus have
|
||||
@@ -100,8 +102,8 @@ export function copyCdnFields(
|
||||
return {};
|
||||
}
|
||||
return {
|
||||
cdnId: dropNull(uploaded.cdnId)?.toString(),
|
||||
cdnKey: uploaded.cdnKey,
|
||||
cdnId: undefined,
|
||||
cdnKey: uploaded.attachmentIdentifier.cdnKey,
|
||||
cdnNumber: dropNull(uploaded.cdnNumber),
|
||||
digest: Bytes.toBase64(uploaded.digest),
|
||||
incrementalMac: uploaded.incrementalMac
|
||||
@@ -110,6 +112,6 @@ export function copyCdnFields(
|
||||
chunkSize: dropNull(uploaded.chunkSize),
|
||||
key: Bytes.toBase64(uploaded.key),
|
||||
plaintextHash: uploaded.plaintextHash,
|
||||
uploadTimestamp: uploaded.uploadTimestamp?.toNumber(),
|
||||
uploadTimestamp: toNumber(uploaded.uploadTimestamp) ?? undefined,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user