diff --git a/src/bot.js b/src/bot.js index f12f77b..5316a4c 100644 --- a/src/bot.js +++ b/src/bot.js @@ -364,7 +364,8 @@ class OcrccBot { }); } - // When a facilitator joins a support session, revoke the other invitations + // When a facilitator joins a support session, make them a moderator + // revoke the other invitations if ( member.membership === "join" && member.userId !== process.env.BOT_USERID && @@ -439,13 +440,12 @@ class OcrccBot { }); // unencrypted messages this.client.on("Room.timeline", (event, room, toStartOfTimeline) => { - if ( - event.getType() === "m.room.message" && - !this.client.isCryptoEnabled() - ) { - if (event.isEncrypted()) { - return; - } + if (event.getType() === "m.room.message") { + logger.log("info", event); + logger.log("info", this.client.isCryptoEnabled()); + logger.log("info", event.isEncrypted()); + } + if (event.getType() === "m.room.message" && !event.isEncrypted()) { this.handleMessageEvent(event); } });