From dd21e9b91fc8e7e755165034cd3c2cdade78e0ec Mon Sep 17 00:00:00 2001 From: derouet2018 <tristan.derouet@gmail.com> Date: Wed, 23 Aug 2023 14:52:53 +0200 Subject: [PATCH] Send message with link to image to matrix when editing message with image and no text in discord --- src/bot.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/bot.ts b/src/bot.ts index a790467..a34cb32 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -1210,6 +1210,9 @@ export class DiscordBot { if (storeEvent && storeEvent.Result) { while (storeEvent.Next()) { const matrixIds = storeEvent.MatrixId.split(";"); + if(!oldMsg.content && oldMsg.attachments.array().length>0){ + newMsg.content = newMsg.content + " " + oldMsg.attachments.array()[0].url; + } await this.OnMessage(newMsg, matrixIds[0]); return; } -- GitLab