Don't explode if it can't send follow-up errors

This _should_ be awaited all the way up, but it didn't work for me,
and better safe than sorry I guess?
This commit is contained in:
Cadence Ember 2025-08-13 20:49:02 +12:00
parent 160efc5592
commit 2a0e22a122

View file

@ -128,16 +128,18 @@ async function sendError(roomID, source, type, e, payload) {
}
// Send
await api.sendEvent(roomID, "m.room.message", {
...builder.get(),
"moe.cadence.ooye.error": {
source: source.toLowerCase(),
payload
},
"m.mentions": {
user_ids: ["@cadence:cadence.moe"]
}
})
try {
await api.sendEvent(roomID, "m.room.message", {
...builder.get(),
"moe.cadence.ooye.error": {
source: source.toLowerCase(),
payload
},
"m.mentions": {
user_ids: ["@cadence:cadence.moe"]
}
})
} catch (e) {}
}
function guard(type, fn) {