diff options
author | Madhur Garg <madhurgarg96@gmail.com> | 2019-07-18 16:55:11 +0530 |
---|---|---|
committer | Madhur Garg <madhurgarg96@gmail.com> | 2019-07-18 16:55:11 +0530 |
commit | 85cd7a9166db2e6e8c249ad0c01937bc52a5ba1f (patch) | |
tree | 147fce00a9c1332f997da4694468b4e8f30b9e79 | |
parent | 2638ba2744317e9b7c51b181c8818b8b5d28606d (diff) | |
download | slixmpp-85cd7a9166db2e6e8c249ad0c01937bc52a5ba1f.tar.gz slixmpp-85cd7a9166db2e6e8c249ad0c01937bc52a5ba1f.tar.bz2 slixmpp-85cd7a9166db2e6e8c249ad0c01937bc52a5ba1f.tar.xz slixmpp-85cd7a9166db2e6e8c249ad0c01937bc52a5ba1f.zip |
Added a function to get current MAM preferences.
-rw-r--r-- | slixmpp/plugins/xep_0313/mam.py | 7 |
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() |