aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2011-01-03 03:01:47 +0100
committerMiklos Vajna <vmiklos@frugalware.org>2011-01-03 03:01:47 +0100
commitcb6d3c9e9ec93705022ec24451246265c7841ebe (patch)
treef8241046ea0f667716d2b659676c966c8c81ac80
parentfbb15f23566d61d4c26a0b9fbcc00cf397737e52 (diff)
Add support for fetching group changes on the fly
So in case a user was not part of a group and it becomes (using Skype UI), then BitlBee is now aware of this. NOTE: current it seems the Skype part of this is broken. Use case: adding a user to group #16 which already has a user. << GROUP 16 NROFUSERS 2 >> GET GROUP 16 NROFUSERS << GROUP 16 NROFUSERS 0 So it notifies about the number of users changed but I can't query the user list as the number of users is then 0 - till Skype is not restarted.
-rw-r--r--skype/skype.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/skype/skype.c b/skype/skype.c
index 8620e2c7..98d46cea 100644
--- a/skype/skype.c
+++ b/skype/skype.c
@@ -851,7 +851,13 @@ static void skype_parse_group(struct im_connection *ic, char *line)
} else
log_message(LOGLVL_ERROR,
"No skype group with id %s. That's probably a bug.", id);
- }
+ } else if (!strncmp(info, "NROFUSERS ", 10))
+ /* Number of users changed in this group, query its type to see
+ * if it's a custom one we should care about. */
+ skype_printf(ic, "GET GROUP %s TYPE", id);
+ else if (!strcmp(info, "TYPE CUSTOM_GROUP"))
+ /* This one is interesting, query its users. */
+ skype_printf(ic, "GET GROUP %s USERS", id);
}
static void skype_parse_chat(struct im_connection *ic, char *line)