Skip to content

Commit

Permalink
Fix remaining ircchannelsubscriptions channel name case problems
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkkao committed Apr 26, 2015
1 parent 3b265b7 commit 56dd4d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/backends/irc/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,15 +662,15 @@ function *handleJoin(userId, msg) {
let subscriptionsKey = `ircchannelsubscriptions:${userId}:${network}`;

if (userId === targetUserId) {
let password = yield redis.hget(subscriptionsKey, channel);
let password = yield redis.hget(subscriptionsKey, channel.toLowerCase());

if (password === null) {
// ircchannelsubscriptions entry is missing. This means IRC server has added the user
// to a channel without any action from the user. Flowdock at least does this.
// ircchannelsubscriptions must be updated as it's used to rejoin channels after a
// server restart.
password = '';
yield redis.hset(subscriptionsKey, channel, password);
yield redis.hset(subscriptionsKey, channel.toLowerCase(), password);
}

if (!conversation) {
Expand Down

0 comments on commit 56dd4d0

Please sign in to comment.