summaryrefslogtreecommitdiff
path: root/poezio/fixes.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/fixes.py')
-rw-r--r--poezio/fixes.py22
1 files changed, 3 insertions, 19 deletions
diff --git a/poezio/fixes.py b/poezio/fixes.py
index 62e67f43..c2db4332 100644
--- a/poezio/fixes.py
+++ b/poezio/fixes.py
@@ -5,31 +5,15 @@ upstream.
TODO: Check that they are fixed and remove those hacks
"""
-import asyncio
-from typing import Callable, Any
-from slixmpp import Message, Iq, ClientXMPP
-from slixmpp.xmlstream import ET
+from slixmpp import Message
+from slixmpp.plugins.xep_0184 import XEP_0184
import logging
log = logging.getLogger(__name__)
-def has_identity(xmpp, jid, identity, on_true=None, on_false=None):
- def _cb(iq):
- ident = lambda x: x[0]
- res = identity in map(ident, iq['disco_info']['identities'])
- if res and on_true is not None:
- on_true()
- if not res and on_false is not None:
- on_false()
-
- asyncio.ensure_future(
- xmpp.plugin['xep_0030'].get_info(jid=jid, callback=_cb)
- )
-
-
-def _filter_add_receipt_request(self, stanza):
+def _filter_add_receipt_request(self: XEP_0184, stanza):
"""
Auto add receipt requests to outgoing messages, if: