Grab freshest attributes when adding attachment to message
This commit is contained in:
parent
32fda78a5c
commit
ad94fef92d
2 changed files with 10 additions and 8 deletions
|
@ -4,16 +4,18 @@ import * as log from '../logging/log';
|
|||
import * as Bytes from '../Bytes';
|
||||
import type { AttachmentDownloadJobTypeType } from '../types/AttachmentDownload';
|
||||
|
||||
import type { MessageModel } from '../models/messages';
|
||||
import type { AttachmentType } from '../types/Attachment';
|
||||
import { getAttachmentSignature, isDownloaded } from '../types/Attachment';
|
||||
import { __DEPRECATED$getMessageById } from '../messages/getMessageById';
|
||||
|
||||
export async function addAttachmentToMessage(
|
||||
message: MessageModel | null | undefined,
|
||||
messageId: string,
|
||||
attachment: AttachmentType,
|
||||
jobLogId: string,
|
||||
{ type }: { type: AttachmentDownloadJobTypeType }
|
||||
): Promise<void> {
|
||||
const message = await __DEPRECATED$getMessageById(messageId);
|
||||
|
||||
if (!message) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue