-
-
Notifications
You must be signed in to change notification settings - Fork 829
Add BuildContact and CRUD functionality for contacts #749
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
That is awesome! It could probably prevent some bans |
purpshell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks pretty good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current naming is consistent with the entire file though?
| } | ||
| } | ||
|
|
||
| func RemoveContact(target types.JID) PatchInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
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