mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-15 00:17:27 +00:00
fix: filter channel team task events from web UI chat
Admin users were seeing team task notifications from other channels (Discord, Telegram, Lark) in their web UI chat due to bypassing the UserID event filter. Added channel check to handleTeamTaskEvent matching the existing pattern in handleAgentEvent.
This commit is contained in:
1 parent
21b6c454ca
commit
63ed4e9351
1 file changed
+7
@@ -437,9 +437,16 @@ export function useChatMessages(sessionKey: string, agentId: string) {
|
||||
progress_percent?: number;
|
||||
progress_step?: string;
|
||||
reason?: string;
|
||||
channel?: string;
|
||||
};
|
||||
if (!event?.team_id) return;
|
||||
|
||||
// Only process team task events from WS channel (matches handleAgentEvent filter).
|
||||
// Prevents channel events (Telegram, Discord, etc.) leaking into web UI chat.
|
||||
if (event.channel && event.channel !== "ws") {
|
||||
return;
|
||||
}
|
||||
|
||||
setTeamTasks((prev) => {
|
||||
const existing = prev.find((t) => t.taskId === event.task_id);
|
||||
|
||||
|
||||
Reference in new issue
Block a user