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:
+12
-10
@@ -128,16 +128,18 @@ async function sendError(roomID, source, type, e, payload) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Send
|
// Send
|
||||||
await api.sendEvent(roomID, "m.room.message", {
|
try {
|
||||||
...builder.get(),
|
await api.sendEvent(roomID, "m.room.message", {
|
||||||
"moe.cadence.ooye.error": {
|
...builder.get(),
|
||||||
source: source.toLowerCase(),
|
"moe.cadence.ooye.error": {
|
||||||
payload
|
source: source.toLowerCase(),
|
||||||
},
|
payload
|
||||||
"m.mentions": {
|
},
|
||||||
user_ids: ["@cadence:cadence.moe"]
|
"m.mentions": {
|
||||||
}
|
user_ids: ["@cadence:cadence.moe"]
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
function guard(type, fn) {
|
function guard(type, fn) {
|
||||||
|
|||||||
Reference in New Issue
Block a user