fix a variety of bugs that snuck in

This commit is contained in:
Cadence Ember
2023-06-28 23:38:58 +12:00
parent 512f61422d
commit 584f19a011
6 changed files with 13 additions and 11 deletions

View File

@@ -78,7 +78,7 @@ function getAllState(roomID) {
async function sendState(roomID, type, stateKey, content, mxid) {
console.log(`[api] state: ${roomID}: ${type}/${stateKey}`)
assert.ok(type)
assert.ok(stateKey)
assert.ok(typeof stateKey === "string")
/** @type {import("../types").R.EventSent} */
const root = await mreq.mreq("PUT", path(`/client/v3/rooms/${roomID}/state/${type}/${stateKey}`, mxid), content)
return root.event_id