summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Buquet <pep@bouah.net>2019-07-22 22:05:05 +0200
committerMaxime Buquet <pep@bouah.net>2019-07-22 22:05:05 +0200
commitd57fbb57a227a083370854259d15154a950e0c86 (patch)
tree33238f6b4e068295448c45e478db25f035e3b8ed
parentd50d996c68ad82974b8384320bbe9cc875b17d56 (diff)
parent85cd7a9166db2e6e8c249ad0c01937bc52a5ba1f (diff)
downloadslixmpp-d57fbb57a227a083370854259d15154a950e0c86.tar.gz
slixmpp-d57fbb57a227a083370854259d15154a950e0c86.tar.bz2
slixmpp-d57fbb57a227a083370854259d15154a950e0c86.tar.xz
slixmpp-d57fbb57a227a083370854259d15154a950e0c86.zip
Merge branch 'mam' into 'master'
Added a function in xep313 plugin to get current MAM preferences. See merge request poezio/slixmpp!19
-rw-r--r--slixmpp/plugins/xep_0313/mam.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/slixmpp/plugins/xep_0313/mam.py b/slixmpp/plugins/xep_0313/mam.py
index c9d8d4b9..8e92bc2b 100644
--- a/slixmpp/plugins/xep_0313/mam.py
+++ b/slixmpp/plugins/xep_0313/mam.py
@@ -90,6 +90,13 @@ class XEP_0313(BasePlugin):
return iq.send(timeout=timeout, callback=wrapped_cb)
+ def get_preferences(self, timeout=None, callback=None):
+ iq = self.xmpp.Iq()
+ iq['type'] = 'get'
+ query_id = iq['id']
+ iq['mam_prefs']['query_id'] = query_id
+ return iq.send(timeout=timeout, callback=callback)
+
def set_preferences(self, jid=None, default=None, always=None, never=None,
ifrom=None, block=True, timeout=None, callback=None):
iq = self.xmpp.Iq()