Bug 69474

Summary: status of non-buddies should be (UNKNOWN, 'unknown', ''), not an error
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: hazeAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: xclaesse
Version: git masterKeywords: patch
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 69493    
Attachments: [gabble] Add regression test coverage for the presence of a non-roster contact
[Haze 0.8 1/2] Return UNKNOWN status for non-buddies, rather than raising an error
[haze 0.8 2/2] Test unknown presences

Description Simon McVittie 2013-09-17 15:22:11 UTC
In Gabble, contacts not on our roster have UNKNOWN presence (e.g. see Bug #25583). In Haze, asking for their presence is an error.

This is especially problematic in Telepathy 1.0, where the presence mixin's get_statuses() callback can no longer fail.
Comment 1 Simon McVittie 2013-09-17 15:23:06 UTC
Created attachment 85996 [details] [review]
[gabble] Add regression test coverage for the presence of a non-roster  contact
Comment 2 Simon McVittie 2013-09-17 15:24:35 UTC
Created attachment 85997 [details] [review]
[Haze 0.8 1/2] Return UNKNOWN status for non-buddies, rather than  raising an error

This is consistent with Gabble.

Also, don't crash if libpurple gives us a PurpleStatusPrimitive
outside the range we understand; guess wildly that it's probably
AVAILABLE.

---

I think this should be merged before 0.8.0, particularly because of the crash fix.
Comment 3 Simon McVittie 2013-09-17 15:25:30 UTC
Created attachment 85998 [details] [review]
[haze 0.8 2/2] Test unknown presences

---

This should also work on next, with s/SIMPLE_// applied.
Comment 4 Xavier Claessens 2013-09-17 16:12:18 UTC
+1
Comment 5 Simon McVittie 2013-09-17 17:16:43 UTC
Fixed in git for 0.7.2 (or probably 0.8.0), 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.