silence some of the default output

This commit is contained in:
Cadence Ember 2023-09-23 18:12:51 +12:00
parent 5dbcc74617
commit 933cf7c6ec

View file

@ -134,7 +134,9 @@ async function sendState(roomID, type, stateKey, content, mxid) {
* @param {number} [timestamp] timestamp of the newly created event, in unix milliseconds
*/
async function sendEvent(roomID, type, content, mxid, timestamp) {
if (!["m.room.message", "m.reaction", "m.sticker"].includes(type)) {
console.log(`[api] event ${type} to ${roomID} as ${mxid || "default sim"}`)
}
/** @type {Ty.R.EventSent} */
const root = await mreq.mreq("PUT", path(`/client/v3/rooms/${roomID}/send/${type}/${makeTxnId.makeTxnId()}`, mxid, {ts: timestamp}), content)
return root.event_id