fix(subscribers): use composite key (user_id + user_type) in subscriber:removed WS handler
Consistent with subscriber:added handler. Prevents removing a member subscriber when an agent with the same UUID is unsubscribed (or vice versa). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
f410799ab5
commit
2ec3e4eb89
1 changed files with 1 additions and 1 deletions
|
|
@ -353,7 +353,7 @@ export function IssueDetail({ issueId, onDelete }: IssueDetailProps) {
|
|||
useCallback((payload: unknown) => {
|
||||
const p = payload as SubscriberRemovedPayload;
|
||||
if (p.issue_id !== id) return;
|
||||
setSubscribers((prev) => prev.filter((s) => s.user_id !== p.user_id));
|
||||
setSubscribers((prev) => prev.filter((s) => !(s.user_id === p.user_id && s.user_type === p.user_type)));
|
||||
}, [id]),
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue