[feat]: add/edit/remove contacts (#1172)

* add/edit/remove contacts

* use proto type in contact action

---------

Co-authored-by: canove <cassio@economicros.com.br>
This commit is contained in:
vini
2025-07-09 16:01:20 -03:00
committed by GitHub
parent 31cb8d78a6
commit 19124426b2
3 changed files with 37 additions and 0 deletions
+10
View File
@@ -605,6 +605,16 @@ export const chatModificationToAppPatch = (mod: ChatModification, jid: string) =
apiVersion: 5,
operation: OP.SET
}
} else if ('contact' in mod) {
patch = {
syncAction: {
contactAction: mod.contact || {}
},
index: ['contact', jid],
type: 'critical_unblock_low',
apiVersion: 2,
operation: mod.contact ? OP.SET : OP.REMOVE
}
} else if ('star' in mod) {
const key = mod.star.messages[0]
patch = {