Bug 21839 - Mishandles <presence type='error'> in response to <presence type='subscribe'>
Summary: Mishandles <presence type='error'> in response to <presence type='subscribe'>
Status: RESOLVED MOVED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: gabble (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on: 45491
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-20 11:31 UTC by Will Thompson
Modified: 2019-12-03 19:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Will Thompson 2009-05-20 11:31:25 UTC
Suppose you try to add someone with an unspellable JID to your roster. Gabble sends:

  <presence type='subscribe' to='foo@bar.cmo'>
    <status>thank you empathy for sending messages i didn't type</status>
  </presence>

and gets back:

  <presence type='error' ...>
    <status>thank you emp...</status>
    <error type='cancel' code='404'>
      <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
  </presence>

This makes the contact show up in SimplePresence with presence "error" and message "thank you empathy for sending messages i didn't type", which is not right at all!

Gabble should probably ignore <status/> in <presence type='error'>; maybe it should also delete them from your roster with MembersChangedDetailed's 'error' set to NotFound or something?
Comment 1 Will Thompson 2011-05-06 04:04:08 UTC
The ContactList interface doesn't make it all that easy to support this.

Because subscription requests are sent as <presence/> stanzas, we can't delay returning from RequestSubscription() until we get a reply: in the happy path, we only get a reply when the contact accepts the subscription which may be literally days in the future. And the ContactList interface has no way for us to subsequently remove the contact with an error message like “sorry this contact doesn't exist”; we can only signal that they've been removed, without a reason. :/
Comment 2 Will Thompson 2012-01-30 05:37:04 UTC
> maybe it
> should also delete them from your roster with MembersChangedDetailed's 'error'
> set to NotFound or something?

For what it's worth, my XMPP server currently has sporadically busted DNS, so I'd be upset if I'd listened to myself and deleted contacts from my roster when I get <presence type='error'> for them…
Comment 3 Will Thompson 2012-02-01 04:50:35 UTC
(In reply to comment #0)
> Suppose you try to add someone with an unspellable JID to your roster. Gabble
> sends:
> 
>   <presence type='subscribe' to='foo@bar.cmo'>
>     <status>thank you empathy for sending messages i didn't type</status>
>   </presence>
> 
> and gets back:
> 
>   <presence type='error' ...>
>     <status>thank you emp...</status>
>     <error type='cancel' code='404'>
>       <remote-server-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
>     </error>
>   </presence>
> 
> This makes the contact show up in SimplePresence with presence "error" and
> message "thank you empathy for sending messages i didn't type", which is not
> right at all!

As of the fixing of bug 45491, this contact will now show up in SimplePresence with message "remote-server-not-found".

The ContactList errors remain.
Comment 4 GitLab Migration User 2019-12-03 19:19:24 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-gabble/issues/34.


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.