1
0
Fork 0

I WAS USING THE WRONG VARIABLE :GRIEF:

This commit is contained in:
Cadence Ember 2023-08-21 21:16:10 +12:00
parent c8021cadec
commit 180708b60e

View file

@ -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