silence some of the default output
This commit is contained in:
parent
5dbcc74617
commit
933cf7c6ec
1 changed files with 3 additions and 1 deletions
|
@ -134,7 +134,9 @@ async function sendState(roomID, type, stateKey, content, mxid) {
|
||||||
* @param {number} [timestamp] timestamp of the newly created event, in unix milliseconds
|
* @param {number} [timestamp] timestamp of the newly created event, in unix milliseconds
|
||||||
*/
|
*/
|
||||||
async function sendEvent(roomID, type, content, mxid, timestamp) {
|
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"}`)
|
console.log(`[api] event ${type} to ${roomID} as ${mxid || "default sim"}`)
|
||||||
|
}
|
||||||
/** @type {Ty.R.EventSent} */
|
/** @type {Ty.R.EventSent} */
|
||||||
const root = await mreq.mreq("PUT", path(`/client/v3/rooms/${roomID}/send/${type}/${makeTxnId.makeTxnId()}`, mxid, {ts: timestamp}), content)
|
const root = await mreq.mreq("PUT", path(`/client/v3/rooms/${roomID}/send/${type}/${makeTxnId.makeTxnId()}`, mxid, {ts: timestamp}), content)
|
||||||
return root.event_id
|
return root.event_id
|
||||||
|
|
Loading…
Reference in a new issue