plugins/mod_roster.lua

changeset 1133
b293d7dc6a45
parent 928
92288c13d7bc
child 1198
545c81364939
--- a/plugins/mod_roster.lua	Thu May 07 19:37:54 2009 +0100
+++ b/plugins/mod_roster.lua	Fri May 08 01:04:51 2009 +0500
@@ -23,6 +23,14 @@
 
 module:add_feature("jabber:iq:roster");
 
+local rosterver_stream_feature = st.stanza("ver", {xmlns="urn:xmpp:features:rosterver"}):tag("optional"):up();
+module:add_event_hook("stream-features", 
+		function (session, features)												
+			if session.username then
+				features:add_child(rosterver_stream_feature);
+			end
+		end);
+
 module:add_iq_handler("c2s", "jabber:iq:roster", 
 		function (session, stanza)
 			if stanza.tags[1].name == "query" then

mercurial