changeset 14072:beb5a667c20d

rostermanager, mod_roster: Include 'approved' attribute in roster items (thanks singpolyma)
author Matthew Wild <mwild1@gmail.com>
date Wed, 11 Feb 2026 15:36:28 +0000
parents 54b30a374953
children b688908622a1
files core/rostermanager.lua plugins/mod_roster.lua
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/rostermanager.lua	Wed Feb 11 11:39:19 2026 +0000
+++ b/core/rostermanager.lua	Wed Feb 11 15:36:28 2026 +0000
@@ -67,7 +67,13 @@
 		local stanza = st.iq({type="set", id=new_id()});
 		stanza:tag("query", {xmlns = "jabber:iq:roster", ver = tostring(roster[false].version or "1")  });
 		if item then
-			stanza:tag("item", {jid = jid, subscription = item.subscription, name = item.name, ask = item.ask});
+			stanza:tag("item", {
+				jid = jid;
+				subscription = item.subscription;
+				name = item.name;
+				ask = item.ask;
+				approved = item.approved;
+			});
 			for group in pairs(item.groups) do
 				stanza:tag("group"):text(group):up();
 			end
--- a/plugins/mod_roster.lua	Wed Feb 11 11:39:19 2026 +0000
+++ b/plugins/mod_roster.lua	Wed Feb 11 15:36:28 2026 +0000
@@ -48,6 +48,7 @@
 					roster:tag("item", {
 						jid = jid,
 						subscription = item.subscription,
+						approved = item.approved,
 						ask = item.ask,
 						name = item.name,
 					});