1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:52:54 +08:00

Prevent channel duplicates

Co-Authored-By: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
Craftplacer 2020-01-11 17:16:11 +01:00 committed by GitHub
parent cd91cc860d
commit cd679707ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -447,7 +447,7 @@ namespace osu.Game.Online.Chat
public void MarkChannelAsRead(Message message)
{
var channel = JoinedChannels.First(c => c.Id == message.ChannelId);
var channel = JoinedChannels.Single(c => c.Id == message.ChannelId);
var req = new MarkChannelAsReadRequest(channel, message);
req.Success += () => channel.LastReadId = message.Id;
req.Failure += e => Logger.Error(e, "Failed to mark channel as read");