Removing groups from chatters when deleting groups.

This commit is contained in:
Tom
2025-01-18 17:56:15 +00:00
parent 3b24208acc
commit c21890b55d
2 changed files with 7 additions and 3 deletions

View File

@ -87,7 +87,13 @@ namespace TwitchChatTTS.Chat.Groups
public bool Remove(string groupId) public bool Remove(string groupId)
{ {
return _groups.Remove(groupId); if (_groups.Remove(groupId))
{
foreach (var entry in _chatters)
entry.Value.Remove(groupId);
return true;
}
return false;
} }
public bool Remove(long chatterId, string groupId) public bool Remove(long chatterId, string groupId)

View File

@ -5,8 +5,6 @@ using Serilog;
using System.Text.Json; using System.Text.Json;
using System.Collections.Concurrent; using System.Collections.Concurrent;
using TwitchChatTTS.OBS.Socket.Data; using TwitchChatTTS.OBS.Socket.Data;
using System.Timers;
using System.Net.WebSockets;
using CommonSocketLibrary.Backoff; using CommonSocketLibrary.Backoff;
namespace TwitchChatTTS.OBS.Socket namespace TwitchChatTTS.OBS.Socket