1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:13:22 +08:00

Fix join process for PMs being incorrect

This commit is contained in:
Dean Herbert 2018-11-21 20:44:41 +09:00
parent b31efb7bb9
commit 2126cf0d9a

View File

@ -312,16 +312,20 @@ namespace osu.Game.Online.Chat
// ensure we are joined to the channel
if (!channel.Joined.Value)
{
if (!alreadyJoined && channel.Type == ChannelType.Public)
if (alreadyJoined)
channel.Joined.Value = true;
else
{
var req = new JoinChannelRequest(channel, api.LocalUser);
req.Success += () => JoinChannel(channel, true);
req.Failure += ex => LeaveChannel(channel);
api.Queue(req);
return channel;
switch (channel.Type)
{
case ChannelType.Public:
var req = new JoinChannelRequest(channel, api.LocalUser);
req.Success += () => JoinChannel(channel, true);
req.Failure += ex => LeaveChannel(channel);
api.Queue(req);
return channel;
}
}
channel.Joined.Value = true;
}
if (CurrentChannel.Value == null)