Changeset

1133:b293d7dc6a45

mod_roster: Advertize roster versioning support
author Waqas Hussain <waqas20@gmail.com>
date Fri, 08 May 2009 01:04:51 +0500
parents 1132:3a63efe285c2
children 1134:3b1809910773
files plugins/mod_roster.lua
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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