]> www.infradead.org Git - pidgin-chime.git/commitdiff
Do not subscribe to users' profile channels
authorDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 15 Mar 2018 17:20:11 +0000 (17:20 +0000)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 15 Mar 2018 17:20:11 +0000 (17:20 +0000)
We aren't supposed to, and we hit a rate limit and get disconnected if we
subscribe to too much, too quickly.

chime-contact.c

index e1462ab501c60c10f7a446e3f58ed10674d14d78..4208f83c886d2dc8a66f66185f2d76135962daf7 100644 (file)
@@ -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;
        }
 }