-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
Description
Reported by a GMT. If a user is joined to a non-public channel like #lounge, incoming new messages in that channel will trigger "Failed to join channel" notifications.
This is because the notification about the messages is coming via the websocket. lazer responds to incoming messages from channel it's not joined to by attempting to join it:
osu/osu.Game/Online/Chat/WebSocketChatClient.cs
Lines 119 to 151 in 2d745fb
| case @"chat.message.new": | |
| Debug.Assert(message.Data != null); | |
| NewChatMessageData? messageData = JsonConvert.DeserializeObject<NewChatMessageData>(message.Data.ToString()); | |
| Debug.Assert(messageData != null); | |
| foreach (var msg in messageData.Messages) | |
| postToChannel(msg); | |
| break; | |
| } | |
| } | |
| private void postToChannel(Message message) | |
| { | |
| if (channelsMap.TryGetValue(message.ChannelId, out Channel? channel)) | |
| { | |
| joinChannel(channel); | |
| NewMessages?.Invoke(new List<Message> { message }); | |
| return; | |
| } | |
| var req = new GetChannelRequest(message.ChannelId); | |
| req.Success += response => | |
| { | |
| joinChannel(channelsMap[message.ChannelId] = response.Channel); | |
| NewMessages?.Invoke(new List<Message> { message }); | |
| }; | |
| req.Failure += ex => Logger.Error(ex, "Failed to join channel"); | |
| api.Queue(req); | |
| } |
which fails because the channel can't be joined from lazer to begin with.
This sort of overlaps with #27597 (reply in thread) / the fact that such channels are currently unjoinable from lazer. Just logging for an indefinite future 🤷
Reactions are currently unavailable