Skip to content

Commit

Permalink
Fixes setting the admin channel not adding to ChatChannels (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss authored and AnturK committed Jun 19, 2017
1 parent 33219b1 commit cb7722a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions TGServerService/Chat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,14 @@ public void SetChannels(string[] channels = null, string adminchannel = null)
}
adminchannel = SanitizeChannelName(adminchannel);
if (adminchannel != null)
{
Config.ChatAdminChannel = adminchannel;
if (!Config.ChatChannels.Contains(adminchannel))
Config.ChatChannels.Add(adminchannel);
}
if (channels != null && Connected())
ChatProvider.SetChannels(CollectionToArray(Config.ChatChannels), null);
}
ChatProvider.SetChannels(CollectionToArray(Config.ChatChannels), Config.ChatAdminChannel);
}
}

//public api
Expand Down

0 comments on commit cb7722a

Please sign in to comment.