From 180708b60e78a07ff366aa25d69ba5345ed33401 Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Mon, 21 Aug 2023 21:16:10 +1200 Subject: [PATCH] I WAS USING THE WRONG VARIABLE :GRIEF: --- d2m/actions/send-message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2m/actions/send-message.js b/d2m/actions/send-message.js index a5c8dac..2dcc324 100644 --- a/d2m/actions/send-message.js +++ b/d2m/actions/send-message.js @@ -38,7 +38,7 @@ async function sendMessage(message, guild) { const eventWithoutType = {...event} delete eventWithoutType.$type - const eventID = await api.sendEvent(roomID, eventType, event, senderMxid, new Date(message.timestamp).getTime()) + const eventID = await api.sendEvent(roomID, eventType, eventWithoutType, senderMxid, new Date(message.timestamp).getTime()) db.prepare("INSERT INTO event_message (event_id, event_type, event_subtype, message_id, channel_id, part, source) VALUES (?, ?, ?, ?, ?, ?, 1)").run(eventID, eventType, event.msgtype || null, message.id, message.channel_id, eventPart) // source 1 = discord eventPart = 1 // TODO: use more intelligent algorithm to determine whether primary or supporting