Move message.getPropsForBubble and friends to selectors
This commit is contained in:
parent
03a187097f
commit
68f1023946
73 changed files with 3394 additions and 2576 deletions
|
@ -2489,10 +2489,14 @@ class MessageReceiverInner extends EventTarget {
|
|||
async downloadAttachment(
|
||||
attachment: AttachmentPointerClass
|
||||
): Promise<DownloadAttachmentType> {
|
||||
const encrypted = await this.server.getAttachment(
|
||||
attachment.cdnId || attachment.cdnKey,
|
||||
attachment.cdnNumber || 0
|
||||
);
|
||||
const cdnId = attachment.cdnId || attachment.cdnKey;
|
||||
const { cdnNumber } = attachment;
|
||||
|
||||
if (!cdnId) {
|
||||
throw new Error('downloadAttachment: Attachment was missing cdnId!');
|
||||
}
|
||||
|
||||
const encrypted = await this.server.getAttachment(cdnId, cdnNumber);
|
||||
const { key, digest, size } = attachment;
|
||||
|
||||
if (!digest) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue