From 85cd7a9166db2e6e8c249ad0c01937bc52a5ba1f Mon Sep 17 00:00:00 2001 From: Madhur Garg Date: Thu, 18 Jul 2019 16:55:11 +0530 Subject: Added a function to get current MAM preferences. --- slixmpp/plugins/xep_0313/mam.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'slixmpp') 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() -- cgit v1.2.3