My XMPP server is acting up and is failing to resolve really obscure domains like “gmail.com”. I only really noticed because the other IM client I use showed me the error message Prosody helpfully sent me (“Connection failed: DNS resolution failed”). Empathy just shows them with the Offline icon, but with no text (not even the word “Offline” or “Error”). So, let's fix this.
Created attachment 56438 [details] [review] Presence: show better error status messages. When you get <presence type='error'>, any <status/> element in the presence is an echo of a stanza you sent out. So the message in that is not the contact's presence: it's either your status, or maybe the message you sent with a subscription request, depending on whether we got the <presence type='error'/> for a roster contact or someone we tried to subscribe to. So instead, I think we should use the text of the error (if any) as the status for such contacts, falling back to the error element name if the server is unkind and doesn't include an error message. Yes, this means strings will show up in the UI in the server's locale, but this is hardly news.
Comment on attachment 56438 [details] [review] Presence: show better error status messages. Review of attachment 56438 [details] [review]: ----------------------------------------------------------------- r+ ::: src/presence-cache.c @@ +43,4 @@ > #include <wocky/wocky-utils.h> > #include <wocky/wocky-namespaces.h> > #include <wocky/wocky-data-form.h> > +#include <wocky/wocky-xmpp-error-enumtypes.h> You know you wanted <wocky/wocky.h> to be a metaheader? I'm still in favour of that :-) ::: tests/twisted/presence/error.py @@ +63,5 @@ > + type_, status, message = presences[hawk_handle] > + assertEquals(cs.PRESENCE_ERROR, type_) > + assertEquals('error', status) > + # FIXME: It might be less user-hostile to give some kind of readable > + # description of the error in future. Certainly true, but without that fix this is still an improvement, so go for it.
Merged to master, thanks!
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.