spec/scansion/pubsub_createdelete.scs
author Matthew Wild <mwild1@gmail.com>
Wed, 27 Mar 2024 15:35:15 +0000
branch0.12
changeset 13469 54a936345aaa
parent 9294 329a670ae975
permissions -rw-r--r--
prosodyctl check: Warn about invalid domain names in the config file This ensures that domain names of virtual hosts and components are valid in XMPP, and that they are encoded correctly.

# Pubsub: Create and delete

[Client] Romeo
	jid: admin@localhost
	password: password

// admin@localhost is assumed to have node creation privileges

---------

Romeo connects

Romeo sends:
	<iq type="set" to="pubsub.localhost" id='create1'>
		<pubsub xmlns="http://jabber.org/protocol/pubsub">
			<create node="princely_musings"/>
		</pubsub>
	</iq>

Romeo receives:
	<iq type="result" id='create1'/>

Romeo sends:
	<iq type="set" to="pubsub.localhost" id='create2'>
		<pubsub xmlns="http://jabber.org/protocol/pubsub">
			<create node="princely_musings"/>
		</pubsub>
	</iq>

Romeo receives:
	<iq type="error" id='create2'>
		<error type="cancel">
			<conflict xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
		</error>
	</iq>

Romeo sends:
	<iq type="set" to="pubsub.localhost" id='delete1'>
		<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
			<delete node="princely_musings"/>
		</pubsub>
	</iq>

Romeo receives:
	<iq type="result" id='delete1'/>

Romeo sends:
	<iq type="set" to="pubsub.localhost" id='delete2'>
		<pubsub xmlns="http://jabber.org/protocol/pubsub#owner">
			<delete node="princely_musings"/>
		</pubsub>
	</iq>

Romeo receives:
	<iq type="error" id='delete2'>
		<error type="cancel">
			<item-not-found xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
		</error>
	</iq>

Romeo disconnects

// vim: syntax=xml: