Diff

mod_seclabels/mod_seclabels.lua @ 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
parent 252:8eae74a31acb
child 449:08ffbbdafeea
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" };