Bug 52053 - RemoveContacts() don't properly reject subscription request
Summary: RemoveContacts() don't properly reject subscription request
Status: NEW
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-13 14:06 UTC by Guillaume Desmottes
Modified: 2012-09-13 09:33 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Desmottes 2012-07-13 14:06:13 UTC
<Robot101> empathy unsubscribes people wrongly on XMPP
<Robot101> when you reject a subscription request
<Robot101> it just subscription='remove' it from the roster
<Robot101> that doesn't actually respond to the presence type='subscribe' stanza
<Robot101> so when you log out and in, you get it back, again.

<cassidy> it calls tp_contact_remove_async()
<cassidy> it calls http://telepathy.freedesktop.org/spec/Connection_Interface_Contact_List.html#Method:RemoveContacts
<sjoerd> yeah, that should set subscribe and publish to no
Comment 1 Robert McQueen 2012-07-13 16:07:58 UTC
To my untrained eyes, it looks like this code in gabble_roster_handle_remove is responsible:

...
  /* If the contact is really stored on the server, deleting their roster item
   * is sufficient. If they're not, we might have some state resulting from
   * a publish request or remote removal or something. */
  if (item->subscription == GABBLE_ROSTER_SUBSCRIPTION_REMOVE)
    {
      /* These will clear a status of REMOVED_REMOTELY or ASK */
      roster_item_set_publish (item, TP_SUBSCRIPTION_STATE_NO, NULL);
...

I think this _set_publish needs to be outside of the _REMOVE case - a contact who is _NONE or _TO on the roster could still be asking us for publishing permission.
Comment 2 Robert McQueen 2012-07-13 16:10:52 UTC
(In reply to comment #1)
> I think this _set_publish needs to be outside of the _REMOVE case - a contact
> who is _NONE or _TO on the roster could still be asking us for publishing
> permission.

Actually a lie - this doesn't cause an unsubscribe to be sent... hrm.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.