Add BuildContact and CRUD functionality for contacts#749
Conversation
|
That is awesome! It could probably prevent some bans |
purpshell
left a comment
There was a problem hiding this comment.
looks pretty good to me
There was a problem hiding this comment.
Idk how for others, but I'd expect method RemoveContact to actually "remove the contact".
For consistency with other methods, we could apply the changes, so the function name makes sense, because it actually "builds remove contact" data - so BuildRemoveContact
The same for BuildAddContact
Or even
BuildAddContactPatchBuildRemoveContactPatch
a bit wordy, but show what the methods actually do
| } | ||
| } | ||
|
|
||
| func BuildContact(target types.JID, fullName string) PatchInfo { |
There was a problem hiding this comment.
| func BuildContact(target types.JID, fullName string) PatchInfo { | |
| func BuildAddContact(target types.JID, fullName string) PatchInfo { |
OR
| func BuildContact(target types.JID, fullName string) PatchInfo { | |
| func BuildAddContactPatch(target types.JID, fullName string) PatchInfo { |
There was a problem hiding this comment.
The current naming is consistent with the entire file though?
| } | ||
| } | ||
|
|
||
| func RemoveContact(target types.JID) PatchInfo { |
There was a problem hiding this comment.
| func RemoveContact(target types.JID) PatchInfo { | |
| func BuildRemoveContact(target types.JID) PatchInfo { |
OR
| func RemoveContact(target types.JID) PatchInfo { | |
| func BuildRemoveContactPatch(target types.JID) PatchInfo { |
|
nice to have and i am abit lost when something with contacts management, LGTM |
|
any updates? |
|
this feature will be very good, looking forward to it |
purpshell
left a comment
There was a problem hiding this comment.
This feature is stable now. For it to work though, you need to enable a little trigger on the main device.
Note that that these contacts only stay on WhatsApp itself rather than becoming system-level, but it does make it better for keeping contacts separate if you have multiple numbers per device 👀.
where is the little trigger? |
Update on this, the feature is rolled out fully and is stable. What's delaying the merge of this PR? |
It works great! |
What is the triagem please? |
|
@fourjr Please resolve the merge conflicts |
|
@purpshell merge conflicts resolved |
This functionality does not work on all WhatsApp mobile apps. I suggest testing using a WhatsApp desktop client as the contact changes are reflected there.
Example Usage