Skip to content

Commit

Permalink
Merge pull request #642 from Half-Shot/hs/no-bot-responding
Browse files Browse the repository at this point in the history
Don't answer any msgtypes other than text in an admin room.
  • Loading branch information
Half-Shot committed Aug 10, 2018
2 parents 338e611 + 031b47f commit e2469f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/bridge/MatrixHandler.js
Expand Up @@ -1146,7 +1146,8 @@ MatrixHandler.prototype._onMessage = Promise.coroutine(function*(req, event) {
let ircAction = IrcAction.fromMatrixAction(mxAction);
let ircRooms = yield this.ircBridge.getStore().getIrcChannelsForRoomId(event.room_id);

if (ircRooms.length === 0) {
// Sometimes bridge's message each other and get stuck in a silly loop. Ensure it's m.text
if (ircRooms.length === 0 && event.content && event.content.msgtype === "m.text") {
// could be an Admin room, so check.
let adminRoom = yield this.ircBridge.getStore().getAdminRoomById(event.room_id);
if (!adminRoom) {
Expand Down

0 comments on commit e2469f3

Please sign in to comment.