[telepathy-gabble/master] make_presence(): take an optional show parameter

Dafydd Harries dafydd.harries at collabora.co.uk
Wed Sep 23 08:16:41 PDT 2009


---
 tests/twisted/gabbletest.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tests/twisted/gabbletest.py b/tests/twisted/gabbletest.py
index e1bfe21..e36633a 100644
--- a/tests/twisted/gabbletest.py
+++ b/tests/twisted/gabbletest.py
@@ -503,7 +503,8 @@ def elem_iq(server, type, **kw):
 
     return iq
 
-def make_presence(_from, to='test at localhost', type=None, status=None, caps=None):
+def make_presence(_from, to='test at localhost', type=None, show=None,
+        status=None, caps=None):
     presence = domish.Element((None, 'presence'))
     presence['from'] = _from
     presence['to'] = to
@@ -511,6 +512,9 @@ def make_presence(_from, to='test at localhost', type=None, status=None, caps=None)
     if type is not None:
         presence['type'] = type
 
+    if show is not None:
+        presence.addElement('show', content=show)
+
     if status is not None:
         presence.addElement('status', content=status)
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list