Uint8Array migration

This commit is contained in:
Fedor Indutny
2021-09-23 17:49:05 -07:00
committed by GitHub
parent daf75190b8
commit 4ef0bf96cc
137 changed files with 2202 additions and 3170 deletions

View File

@@ -7,7 +7,7 @@ import { v4 as getGuid } from 'uuid';
import dataInterface from '../sql/Client';
import * as durations from '../util/durations';
import { downloadAttachment } from '../util/downloadAttachment';
import { stringFromBytes } from '../Crypto';
import * as Bytes from '../Bytes';
import {
AttachmentDownloadJobType,
AttachmentDownloadJobTypeType,
@@ -319,7 +319,7 @@ async function _addAttachmentToMessage(
attachment
);
message.set({
body: attachment.error ? message.get('body') : stringFromBytes(data),
body: attachment.error ? message.get('body') : Bytes.toString(data),
bodyPending: false,
});
} finally {