changeset 266:e7296274f48c

mod_seclabels: Advertise features in account disco#info, fixes interop with Swift
author Kim Alvefur <zash@zash.se>
date Sun, 07 Nov 2010 16:58:13 +0100
parents 8cd2fab3135a
children 9a35c7e2fee4
files mod_seclabels/mod_seclabels.lua
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_seclabels/mod_seclabels.lua	Sat Oct 16 08:09:48 2010 +0500
+++ b/mod_seclabels/mod_seclabels.lua	Sun Nov 07 16:58:13 2010 +0100
@@ -5,6 +5,12 @@
 
 module:add_feature(xmlns_label);
 
+module:hook("account-disco-info", function(event)
+	local stanza = event.stanza;
+	stanza:tag('feature', {var=xmlns_label}):up();
+	stanza:tag('feature', {var=xmlns_label_catalog}):up();
+end);
+
 local labels = {
 	Classified = {
 		SECRET = { color = "black", bgcolor = "aqua", label = "THISISSECRET" };