set_contact_groups_async
Description:
public async bool set_contact_groups_async (string[]? groups) throws Error
Add this to the given groups (creating new groups if necessary), and remove it from all other groups.
If the user is removed from a group of which they were the only member, the group MAY be removed automatically. You can then call set_contact_groups_async.end to get the result of the operation.
If the operation is successful and CONTACT_GROUPS
is prepared, the contact_groups property will be
updated (emitting "notify::contact-groups" signal) and
contact_groups_changed signal will be emitted
before callback
is called. That means you can call
get_contact_groups to get the new contact groups
inside callback
.
Parameters:
this |
a Contact |
groups |
the set of groups which the contact should be in (may be |
callback |
a callback to call when the request is satisfied |
n_groups |
the number of groups, or -1 if |
user_data |
data to pass to |