mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-09 20:03:04 +02:00
progress on edits
This commit is contained in:
parent
f16900553a
commit
96dd488e39
5 changed files with 166 additions and 5 deletions
|
@ -25,7 +25,7 @@ async function sendEvent(event) {
|
|||
let eventPart = 0 // 0 is primary, 1 is supporting
|
||||
for (const message of messages) {
|
||||
const messageResponse = await channelWebhook.sendMessageWithWebhook(channelID, message)
|
||||
db.prepare("INSERT INTO event_message (event_id, message_id, channel_id, part, source) VALUES (?, ?, ?, ?, 0)").run(event.event_id, messageResponse.id, channelID, eventPart) // source 0 = matrix
|
||||
db.prepare("INSERT INTO event_message (event_id, event_type, event_subtype, message_id, channel_id, part, source) VALUES (?, ?, ?, ?, ?, ?, 0)").run(event.event_id, event.type, event.content.msgtype || null, messageResponse.id, channelID, eventPart) // source 0 = matrix
|
||||
|
||||
eventPart = 1 // TODO: use more intelligent algorithm to determine whether primary or supporting?
|
||||
messageResponses.push(messageResponse)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue