From f6a35e847513cb32b1a483bb4bf068e49361b3f0 Mon Sep 17 00:00:00 2001 From: eeeeeta <eeeeeta@users.noreply.github.com> Date: Wed, 30 May 2018 19:28:35 +0100 Subject: [PATCH] fix odd syntax --- src/bot.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/bot.ts b/src/bot.ts index 545d563..64674d0 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -579,14 +579,13 @@ export class DiscordBot { info.h = attachment.height; } rooms.forEach((room) => { - const prom = intent.sendMessage(room, { + intent.sendMessage(room, { body: attachment.filename, info, msgtype, url: content.mxcUrl, external_url: attachment.url, - }); - prom.then((res) => { + }).then((res) => { const evt = new DbEvent(); evt.MatrixId = res.event_id + ";" + room; evt.DiscordId = msg.id; -- GitLab