Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
7c74cac2 by Philipp Hörist at 2019-08-01T08:47:38Z
MUC: Add method for canceling captcha challenges

- - - - -


1 changed file:

- nbxmpp/modules/muc.py


Changes:

=====================================
nbxmpp/modules/muc.py
=====================================
@@ -26,6 +26,7 @@ from nbxmpp.protocol import NS_MUC_ADMIN
 from nbxmpp.protocol import NS_MUC_OWNER
 from nbxmpp.protocol import NS_CAPTCHA
 from nbxmpp.protocol import NS_ADDRESS
+from nbxmpp.protocol import ERR_NOT_ACCEPTABLE
 from nbxmpp.protocol import JID
 from nbxmpp.protocol import Iq
 from nbxmpp.protocol import Message
@@ -495,6 +496,12 @@ class MUC:
         captcha.addChild(node=form_node)
         return iq
 
+    def cancel_captcha(self, room_jid, message_id):
+        message = Message(typ='error', to=room_jid)
+        message.setID(message_id)
+        message.setError(ERR_NOT_ACCEPTABLE)
+        self._client.send(message)
+
     @callback
     def _default_response(self, stanza):
         if not isResultNode(stanza):



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/commit/7c74cac2b8815994bdbd435242ae0d7005b904a7

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/commit/7c74cac2b8815994bdbd435242ae0d7005b904a7
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to