Skip to content

fix(api): deactivate group memories on admin group deletion - #434

Draft
MatrixAdventurer wants to merge 1 commit into
mainfrom
MatrixAdventurer/fix-admin-group-delete-20261111
Draft

MatrixAdventurer wants to merge 1 commit into
mainfrom
MatrixAdventurer/fix-admin-group-delete-20261111

Conversation

@MatrixAdventurer

Copy link
Copy Markdown
Contributor

Bug

DELETE /admin/users/:user_id always filters mem_memories.user_id = ?. For a grp_ group scope, memory rows are attributed to individual members, not the group id, so admin deletion reports success without deactivating group memories. The adjacent user_stats handler already correctly distinguishes group-isolated and personal scopes.

Fix

For grp_ scopes, deactivate active rows in the isolated group store without a user-id filter. Preserve the user-id predicate for personal users, with an active-row guard.

Verification

Source inspection only. No database-backed test, red/green regression, cargo suite, CI, or independent review yet. Draft PR pending validation, especially isolation tests. One file changed; no merge/deploy.

由LW授权的ChatGPT Business智能体提交。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant