vinboard: manual request on message delete until dysnomia fixes missing thread id for deleteWebhookMessage

This commit is contained in:
Cynthia Foxwell 2024-07-10 16:13:07 -06:00
parent 55b6c604ed
commit bc7977f9fa

View file

@ -347,10 +347,15 @@ async function processReaction(_msg, reaction, user) {
if (trueCount == 0) { if (trueCount == 0) {
logger.verbose("vinboard", `Deleting entry for "${msg.id}"`); logger.verbose("vinboard", `Deleting entry for "${msg.id}"`);
if (dbEntry.board_id) { if (dbEntry.board_id) {
await hf.bot.deleteWebhookMessage( /*await hf.bot.deleteWebhookMessage(
vinboard_webhook.id, vinboard_webhook.id,
vinboard_webhook.token, vinboard_webhook.token,
dbEntry.board_id dbEntry.board_id,
VINBOARD_THREAD_ID
);*/
await hf.bot.requestHandler.request(
"DELETE",
`/webhooks/${vinboard_webhook.id}/${vinboard_webhook.token}/messages/${dbEntry.board_id}?thread_id=${VINBOARD_THREAD_ID}`
); );
await deleteBoardEntry(msg.id); await deleteBoardEntry(msg.id);
} }