mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 15:27:20 +08:00
disallow current user from opening their own private channel
This commit is contained in:
parent
78f8157e2b
commit
4e6d7137aa
@ -81,6 +81,9 @@ namespace osu.Game.Online.Chat
|
||||
if (user == null)
|
||||
throw new ArgumentNullException(nameof(user));
|
||||
|
||||
if (user.Id == api.LocalUser.Value.Id)
|
||||
return;
|
||||
|
||||
CurrentChannel.Value = JoinedChannels.FirstOrDefault(c => c.Type == ChannelType.PM && c.Users.Count == 1 && c.Users.Any(u => u.Id == user.Id))
|
||||
?? new Channel(user);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user