🐛 Fix websocket will put message in wrong channel

This commit is contained in:
LittleSheep 2025-01-14 23:32:02 +08:00
parent 25942c2338
commit acf4e634fe

View File

@ -74,6 +74,7 @@ class ChatMessageController extends ChangeNotifier {
_wsSubscription = _ws.stream.stream.listen((event) {
switch (event.method) {
case 'events.new':
if (event.payload?['channel_id'] != channel?.id) break;
final payload = SnChatMessage.fromJson(event.payload!);
_addMessage(payload);
break;