telepathy-gabble: stop using GetPresences()

Guillaume Desmottes gdesmott at kemper.freedesktop.org
Fri Oct 11 14:58:34 PDT 2013


Module: telepathy-gabble
Branch: master
Commit: a3266dab8044470dcbca6777d9dfc5070b616f1b
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=a3266dab8044470dcbca6777d9dfc5070b616f1b

Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date:   Wed Oct  9 15:25:26 2013 -0400

stop using GetPresences()

---

 tests/twisted/presence_helper.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/tests/twisted/presence_helper.py b/tests/twisted/presence_helper.py
index 5d89a75..7689633 100644
--- a/tests/twisted/presence_helper.py
+++ b/tests/twisted/presence_helper.py
@@ -1,2 +1,8 @@
+import constants as cs
+
 def get_contacts_presences_sync(conn, contacts):
-    return conn.SimplePresence.GetPresences(contacts)
+     h2asv = conn.Contacts.GetContactAttributes(contacts, [cs.CONN_IFACE_SIMPLE_PRESENCE], False)
+     presences = {}
+     for h in contacts:
+         presences[h] = h2asv[h][cs.ATTR_PRESENCE]
+     return presences



More information about the telepathy-commits mailing list