1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 15:53:51 +08:00

break when already found user

Co-authored-by: Salman Ahmed <frenzibyte@gmail.com>
This commit is contained in:
rednir 2021-09-10 08:01:38 +01:00 committed by GitHub
parent 255f8a9769
commit 84c152e7b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -268,8 +268,12 @@ namespace osu.Game.Online.Chat
// Check if the user has joined requested channel already. // Check if the user has joined requested channel already.
var alreadyJoinedChannel = JoinedChannels.FirstOrDefault( var alreadyJoinedChannel = JoinedChannels.FirstOrDefault(
c => c.Type == ChannelType.PM && c.Users.Count == 1 && c.Name.Equals(content, StringComparison.OrdinalIgnoreCase)); c => c.Type == ChannelType.PM && c.Users.Count == 1 && c.Name.Equals(content, StringComparison.OrdinalIgnoreCase));
if (alreadyJoinedChannel != null) if (alreadyJoinedChannel != null)
{
CurrentChannel.Value = alreadyJoinedChannel; CurrentChannel.Value = alreadyJoinedChannel;
break;
}
var request = new GetUserRequest(content); var request = new GetUserRequest(content);
request.Success += OpenPrivateChannel; request.Success += OpenPrivateChannel;