Hopefully prevent checkMissed errors from crashing

This commit is contained in:
Cadence Ember
2025-01-12 13:11:51 +13:00
parent a3e94a215a
commit 85269ea153
2 changed files with 9 additions and 4 deletions

View File

@@ -232,7 +232,7 @@ async function syncSpaceExpressions(data, checkBeforeSync) {
} }
if (isDeepStrictEqual(existing, content)) return if (isDeepStrictEqual(existing, content)) return
} }
api.sendState(spaceID, "im.ponies.room_emotes", eventKey, content) await api.sendState(spaceID, "im.ponies.room_emotes", eventKey, content)
} }
await update(spaceID, "emojis", "moe.cadence.ooye.pack.emojis", expression.emojisToState) await update(spaceID, "emojis", "moe.cadence.ooye.pack.emojis", expression.emojisToState)

View File

@@ -51,9 +51,14 @@ const utils = {
} }
if (listen === "full") { if (listen === "full") {
eventDispatcher.checkMissedExpressions(message.d) try {
eventDispatcher.checkMissedPins(client, message.d) await eventDispatcher.checkMissedExpressions(message.d)
eventDispatcher.checkMissedMessages(client, message.d) await eventDispatcher.checkMissedPins(client, message.d)
await eventDispatcher.checkMissedMessages(client, message.d)
} catch (e) {
console.error("Failed to sync missed events. To retry, please fix this error and restart OOYE:")
console.error(e)
}
} }
} else if (message.t === "GUILD_UPDATE") { } else if (message.t === "GUILD_UPDATE") {