Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Hörist <philipp@hoerist.com>2019-10-13 12:57:29 +0300
committerPhilipp Hörist <philipp@hoerist.com>2019-10-13 12:57:29 +0300
commitaf360130ec8655f9c947fc97bee2c033d62d2798 (patch)
treecba8cb1211733d5dd09408f4daec32dbd135d390 /nbxmpp/protocol.py
parenta15b98aec870e0e6c8fac08f102b5da182aa0470 (diff)
Add OOB (XEP-0066) support
Diffstat (limited to 'nbxmpp/protocol.py')
-rw-r--r--nbxmpp/protocol.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/nbxmpp/protocol.py b/nbxmpp/protocol.py
index 504fdce..7f2926e 100644
--- a/nbxmpp/protocol.py
+++ b/nbxmpp/protocol.py
@@ -1363,6 +1363,12 @@ class Message(Protocol):
def setReceiptReceived(self, id_):
self.setTag('received', namespace=NS_RECEIPTS, attrs={'id': id_})
+ def setOOB(self, url, desc=None):
+ oob = self.setTag('x', namespace=NS_X_OOB)
+ oob.setTagData('url', url)
+ if desc is not None:
+ oob.setTagData('desc', desc)
+
class Presence(Protocol):