# HG changeset patch # User Waqas Hussain # Date 1241726691 -18000 # Node ID b293d7dc6a453e4650166d03aff460ce2326ddbe # Parent 3a63efe285c29c22e1f61e7ed3f34d08f817cbdc mod_roster: Advertize roster versioning support diff -r 3a63efe285c2 -r b293d7dc6a45 plugins/mod_roster.lua --- 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