store the channel_id on event_message
This commit is contained in:
parent
1d6e833b22
commit
0f4f404160
5 changed files with 150 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, part, source) VALUES (?, ?, ?, 0)").run(event.event_id, messageResponse.id, eventPart) // source 0 = matrix
|
||||
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
|
||||
|
||||
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