Merge 0.12->trunk
authorKim Alvefur <zash@zash.se>
Sun, 17 Dec 2023 19:02:56 +0100
changeset 13413 95d8875c90dc
parent 13411 736ab1f7b173 (current diff)
parent 13412 d7857ef7843a (diff)
child 13414 7efdd143fdfc
Merge 0.12->trunk
plugins/mod_disco.lua
--- a/plugins/mod_disco.lua	Sun Dec 17 16:41:47 2023 +0100
+++ b/plugins/mod_disco.lua	Sun Dec 17 19:02:56 2023 +0100
@@ -173,6 +173,8 @@
 	if not stanza.attr.to or (expose_admins and target_is_admin) or is_contact_subscribed(username, module.host, jid_bare(stanza.attr.from)) then
 		if node and node ~= "" then
 			local reply = st.reply(stanza):tag('query', {xmlns='http://jabber.org/protocol/disco#info', node=node});
+			reply:tag("feature", { var = "http://jabber.org/protocol/disco#info" }):up();
+			reply:tag("feature", { var = "http://jabber.org/protocol/disco#items" }):up();
 			if not reply.attr.from then reply.attr.from = origin.username.."@"..origin.host; end -- COMPAT To satisfy Psi when querying own account
 			local node_event = { origin = origin, stanza = stanza, reply = reply, node = node, exists = false};
 			local ret = module:fire_event("account-disco-info-node", node_event);
@@ -193,6 +195,8 @@
 		else
 			reply:tag('identity', {category='account', type='registered'}):up();
 		end
+		reply:tag("feature", { var = "http://jabber.org/protocol/disco#info" }):up();
+		reply:tag("feature", { var = "http://jabber.org/protocol/disco#items" }):up();
 		module:fire_event("account-disco-info", { origin = origin, reply = reply });
 		origin.send(reply);
 		return true;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spec/scansion/disco_self.scs	Sun Dec 17 19:02:56 2023 +0100
@@ -0,0 +1,26 @@
+# Basic login and initial presence
+
+[Client] Romeo
+	jid: discoverer@localhost
+	password: password
+
+---------
+
+Romeo connects
+
+Romeo sends:
+	<iq type="get" id="info1">
+		<query xmlns="http://jabber.org/protocol/disco#info"/>
+	</iq>
+
+Romeo receives:
+	<iq type="result" id="info1">
+		<query xmlns="http://jabber.org/protocol/disco#info" scansion:strict="false">
+			<identity xmlns="http://jabber.org/protocol/disco#info" category="account" type="registered"/>
+			<feature var="http://jabber.org/protocol/disco#info"/>
+			<feature var="http://jabber.org/protocol/disco#items"/>
+		</query>
+	</iq>
+
+Romeo disconnects
+