From: David Woodhouse Date: Thu, 15 Mar 2018 17:20:11 +0000 (+0000) Subject: Do not subscribe to users' profile channels X-Git-Tag: v0.9~50 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5d2457b89861ea997b56f6c8b0280b358cd27673;p=pidgin-chime.git Do not subscribe to users' profile channels We aren't supposed to, and we hit a rate limit and get disconnected if we subscribe to too much, too quickly. --- diff --git a/chime-contact.c b/chime-contact.c index e1462ab..4208f83 100644 --- a/chime-contact.c +++ b/chime-contact.c @@ -271,14 +271,10 @@ subscribe_contact(ChimeConnection *cxn, ChimeContact *contact) contact->cxn = cxn; - if (contact->profile_channel) + if (contact->presence_channel) chime_jugg_subscribe(cxn, contact->presence_channel, "Presence", contact_presence_jugg_cb, contact); - if (contact->profile_channel) - chime_jugg_subscribe(cxn, contact->profile_channel, - NULL, NULL, NULL); - /* As well as subscribing to the channel, we'll need to fetch the * initial presence information for this contact */ priv->contacts_needed = g_slist_prepend(priv->contacts_needed, contact); @@ -617,8 +613,7 @@ static void unsubscribe_contact(gpointer key, gpointer val, gpointer data) if (contact->presence_channel) chime_jugg_unsubscribe(contact->cxn, contact->presence_channel, "Presence", contact_presence_jugg_cb, contact); - if (contact->profile_channel) - chime_jugg_unsubscribe(contact->cxn, contact->profile_channel, NULL, NULL, NULL); + contact->cxn = NULL; } }