From: Sascha Silbe <sascha-pgp@silbe.org>
Subject: [PATCH] mark legacy clients as valid (#1749)
According to source comments, validity is supposed to get set "when the buddy
either has, or has tried and failed to get, a color, a nick and a key".
We now implement the latter part ("has tried and failed") as well.
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
---
src/presenceservice.py | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/presenceservice.py b/src/presenceservice.py
index 84c3cc2..aea45ae 100644
a
|
b
|
class PresenceService(ExportedGObject): |
376 | 376 | buddy = self._handles_buddies[tp].get(contact) |
377 | 377 | if buddy is not None and buddy is not self._owner: |
378 | 378 | buddy.update_buddy_properties(tp, props) |
| 379 | def get_properties_error(e): |
| 380 | handle_error(e, 'fetching buddy properties') |
| 381 | buddy = self._handles_buddies[tp].get(contact) |
| 382 | if buddy is not None: |
| 383 | buddy.update_buddy_properties(tp, {}) |
379 | 384 | def get_properties(): |
380 | 385 | try: |
381 | 386 | conn[CONN_INTERFACE_BUDDY_INFO].GetProperties(contact, |
382 | 387 | byte_arrays=True, reply_handler=got_properties, |
383 | | error_handler=lambda e: |
384 | | handle_error(e, 'fetching buddy properties')) |
| 388 | error_handler=get_properties_error) |
385 | 389 | except Exception, e: |
386 | 390 | gobject.idle_add(self._run_contacts_online_queue) |
387 | | handle_error(e, 'fetching buddy properties') |
| 391 | get_properties_error(e) |
388 | 392 | def got_current_activity(current_activity, room): |
389 | 393 | gobject.idle_add(self._run_contacts_online_queue) |
390 | 394 | buddy = self._handles_buddies[tp].get(contact) |