Commit ce7fc535 authored by Philipp Hörist's avatar Philipp Hörist

PubSub: Add delete() method

parent ceea0a8d
......@@ -192,6 +192,13 @@ class PubSub(BaseModule):
response = yield _make_retract_request(node, id_, jid, notify)
yield process_response(response)
@iq_request_task
def delete(self, node, jid=None):
_task = yield
response = yield _make_delete_request(node, jid)
yield process_response(response)
@iq_request_task
def reconfigure_node(self, node, options, jid=None):
_task = yield
......@@ -397,6 +404,14 @@ def _make_retract_request(node, id_, jid, notify):
return query
def _make_delete_request(node, jid):
query = Iq('set', to=jid)
pubsub = query.addChild('pubsub', namespace=Namespace.PUBSUB_OWNER)
pubsub.addChild('delete', attrs={'node': node})
return query
def _make_node_configuration(node, form, jid):
query = Iq('set', to=jid)
pubsub = query.addChild('pubsub', namespace=Namespace.PUBSUB_OWNER)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment