forked from cadence/out-of-your-element
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:
parent
160efc5592
commit
2a0e22a122
1 changed files with 12 additions and 10 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue