Fixed IRC federation's issues with the no-cache branch (#11906)
parent
a265af96f8
commit
cabcecab88
@ -1,15 +1,11 @@ |
||||
export default function handleOnCreateRoom(user, room) { |
||||
if (!room.usernames) { |
||||
return this.log(`Room ${ room.name } does not have a valid list of usernames`); |
||||
} |
||||
|
||||
for (const username of room.usernames) { |
||||
const user = RocketChat.models.Users.findOne({ username }); |
||||
const users = RocketChat.models.Users.findByRoomId(room._id); |
||||
|
||||
users.forEach((user) => { |
||||
if (user.profile.irc.fromIRC) { |
||||
this.sendCommand('joinChannel', { room, user }); |
||||
} else { |
||||
this.sendCommand('joinedChannel', { room, user }); |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
|
Loading…
Reference in new issue