mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
check if user joined requested channel already
This commit is contained in:
parent
5c385e84ea
commit
f54d5675db
@ -264,6 +264,11 @@ namespace osu.Game.Online.Chat
|
||||
break;
|
||||
}
|
||||
|
||||
// Check if the user has joined requested channel already.
|
||||
var alreadyJoinedChannel = JoinedChannels.FirstOrDefault(c => c.Type == ChannelType.PM && c.Users.Count == 1 && c.Name == content);
|
||||
if (alreadyJoinedChannel != null)
|
||||
CurrentChannel.Value = alreadyJoinedChannel;
|
||||
|
||||
var request = new GetUserRequest(content);
|
||||
request.Success += OpenPrivateChannel;
|
||||
request.Failure += _ => target.AddNewMessages(new ErrorMessage("User not found."));
|
||||
|
Loading…
Reference in New Issue
Block a user