For 'original' attachments, always use the attachment link from the DMs, even in staff replies

cshd
Dragory 2020-10-27 18:11:59 +02:00
parent c761802ddd
commit 7196e690a2
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
1 changed files with 6 additions and 1 deletions

View File

@ -274,8 +274,13 @@ class Thread {
return false; return false;
} }
// Special case: "original" attachments
if (config.attachmentStorage === "original") {
threadMessage.attachments = dmMessage.attachments.map(att => att.url);
}
threadMessage.dm_message_id = dmMessage.id; threadMessage.dm_message_id = dmMessage.id;
await this._updateThreadMessage(threadMessage.id, { dm_message_id: dmMessage.id }); await this._updateThreadMessage(threadMessage.id, threadMessage.getSQLProps());
// Show the reply in the inbox thread // Show the reply in the inbox thread
const inboxMessage = await this._postToThreadChannel(inboxContent, files); const inboxMessage = await this._postToThreadChannel(inboxContent, files);