Prevent channel duplicates

This commit is contained in:
Craftplacer 2020-01-22 00:29:12 +01:00
parent 5978e2c0e2
commit 795051e256

View File

@ -79,7 +79,7 @@ namespace osu.Game.Online.Chat
/// </remarks> /// </remarks>
public void HandleMessages(long channelId, IEnumerable<Message> messages) public void HandleMessages(long channelId, IEnumerable<Message> messages)
{ {
var channel = channelManager.JoinedChannels.FirstOrDefault(c => c.Id == channelId); var channel = channelManager.JoinedChannels.SingleOrDefault(c => c.Id == channelId);
if (channel == null) if (channel == null)
{ {