Hoffmann
Hoffmann

Reputation: 1082

How to move contacts to another group in pidgin/purple/finch via DBus?

I didn't find a way to move multiple contact buddies to another group in pidgin/finch/libpurple over DBus (e.g. with python) ? I didn't find anything in the API 1|2

Upvotes: 1

Views: 100

Answers (1)

EionRobb
EionRobb

Reputation: 583

Kinda confusing but you want to use purple_blist_add_contact(). Unfortunately I can't help you with the Python part, but in C you would:

// First get the contact of the buddy
PurpleContact *contact = purple_buddy_get_contact(buddy);
// Find the group. Potentially, create the group if it doesn't exist
PurpleGroup *new_group = purple_blist_find_group("New group name");

purple_blist_add_contact(contact, new_group, NULL);

Contacts can only be part of one group so it effectively moves it from one group to another. Hopefully the C code is enough to know which Python/dbus calls to make.

Upvotes: 2

Related Questions