Software /
code /
prosody-modules
Comparison
mod_vjud/mod_vjud.lua @ 1318:5d49dc72b732
mod_vjud: Add an <identity> if loaded as a component (thanks gryffus)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Feb 2014 11:00:30 +0100 |
parent | 1296:b1a92a87309c |
child | 1319:400a7fdd2049 |
comparison
equal
deleted
inserted
replaced
1317:35c57db6877f | 1318:5d49dc72b732 |
---|---|
38 module:get_host_type() == "component" | 38 module:get_host_type() == "component" |
39 and module.host:gsub("^[^.]+%.","") | 39 and module.host:gsub("^[^.]+%.","") |
40 or module.host); | 40 or module.host); |
41 | 41 |
42 module:depends"disco"; | 42 module:depends"disco"; |
43 if module:get_host_type() == "completed" then | |
44 module:add_identity("directory", "user", module:get_option_string("name", "User search")); | |
45 end | |
43 module:add_feature("jabber:iq:search"); | 46 module:add_feature("jabber:iq:search"); |
44 | 47 |
45 local vCard_mt = { | 48 local vCard_mt = { |
46 __index = function(t, k) | 49 __index = function(t, k) |
47 if type(k) ~= "string" then return nil end | 50 if type(k) ~= "string" then return nil end |