From 9735b6d6dc5ff6b5d577d2ba7511d74a9de99f38 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 6 Feb 2022 17:38:45 +0100 Subject: [PATCH] fix: remove fixes.has_identity which is now unused --- poezio/fixes.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/poezio/fixes.py b/poezio/fixes.py index a8282006..2d5107fb 100644 --- a/poezio/fixes.py +++ b/poezio/fixes.py @@ -15,20 +15,6 @@ 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.create_task( - xmpp.plugin['xep_0030'].get_info(jid=jid, callback=_cb) - ) - - def _filter_add_receipt_request(self, stanza): """ Auto add receipt requests to outgoing messages, if: