core: merge contacts when connecting via group link (#1265)

This commit is contained in:
JRoberts
2022-10-27 23:38:03 +04:00
committed by GitHub
parent 352a4f3d2a
commit 179b9e093f
3 changed files with 51 additions and 12 deletions
+4
View File
@@ -1345,6 +1345,10 @@ mergeContactRecords db userId Contact {contactId = toContactId} Contact {contact
db
"UPDATE group_members SET invited_by = ?, updated_at = ? WHERE invited_by = ? AND user_id = ?"
(toContactId, currentTs, fromContactId, userId)
DB.execute
db
"UPDATE chat_items SET contact_id = ?, updated_at = ? WHERE contact_id = ? AND user_id = ?"
(toContactId, currentTs, fromContactId, userId)
DB.executeNamed
db
[sql|