core: fix changing profile of prepared chats losing chat items (#6843)

This commit is contained in:
spaced4ndy
2026-04-20 13:28:01 +00:00
committed by GitHub
parent d3a2c9d08d
commit e8d16349ae
3 changed files with 32 additions and 0 deletions
+8
View File
@@ -687,6 +687,14 @@ updatePreparedGroupUser db vr user gInfo@GroupInfo {groupId, membership} hostMem
WHERE group_profile_id IN (SELECT group_profile_id FROM groups WHERE group_id = ?)
|]
(newUserId, currentTs, groupId)
DB.execute
db
[sql|
UPDATE chat_items
SET user_id = ?, updated_at = ?
WHERE group_id = ?
|]
(newUserId, currentTs, groupId)
safeDeleteLDN db user oldGroupLDN
updateMembership GroupMember {groupMemberId = membershipId} currentTs =
DB.execute