1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00

Stop requesting messages as part of initial chat presence

This commit is contained in:
Dean Herbert 2022-11-21 15:17:54 +09:00
parent 4a79141824
commit 5c640d15a0
2 changed files with 5 additions and 1 deletions

View File

@ -25,6 +25,7 @@ namespace osu.Game.Online.API.Requests
var req = base.CreateWebRequest();
if (channel != null) req.AddParameter(@"channel", channel.Id.ToString());
req.AddParameter(@"since", since.ToString());
req.AddParameter(@"includes[]", "presence");
return req;
}

View File

@ -67,8 +67,11 @@ namespace osu.Game.Online.Notifications
protected void HandleChannelParted(Channel channel) => ChannelParted?.Invoke(channel);
protected void HandleMessages(List<Message> messages)
protected void HandleMessages(List<Message>? messages)
{
if (messages == null)
return;
NewMessages?.Invoke(messages);
lastMessageId = Math.Max(lastMessageId, messages.LastOrDefault()?.Id ?? 0);
}