diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-10-13 12:57:29 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-10-13 12:57:29 +0300 |
commit | af360130ec8655f9c947fc97bee2c033d62d2798 (patch) | |
tree | cba8cb1211733d5dd09408f4daec32dbd135d390 /nbxmpp/protocol.py | |
parent | a15b98aec870e0e6c8fac08f102b5da182aa0470 (diff) |
Add OOB (XEP-0066) support
Diffstat (limited to 'nbxmpp/protocol.py')
-rw-r--r-- | nbxmpp/protocol.py | 6 |
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): |