Mercurial > prosody-hg
comparison plugins/mod_component.lua @ 8518:0de0018bdf91
Merge 0.10->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 04 Feb 2018 01:40:11 +0100 |
| parents | 7d9a2c200736 47115b0ca133 |
| children | cbcac5b9b7ce |
comparison
equal
deleted
inserted
replaced
| 8507:71ef6d509105 | 8518:0de0018bdf91 |
|---|---|
| 118 local node = query.attr.node; | 118 local node = query.attr.node; |
| 119 if query.name == "query" and query.attr.xmlns == "http://jabber.org/protocol/disco#info" and (not node or node == "") then | 119 if query.name == "query" and query.attr.xmlns == "http://jabber.org/protocol/disco#info" and (not node or node == "") then |
| 120 local name = module:get_option_string("name"); | 120 local name = module:get_option_string("name"); |
| 121 if name then | 121 if name then |
| 122 event.origin.send(st.reply(stanza):tag("query", { xmlns = "http://jabber.org/protocol/disco#info" }) | 122 event.origin.send(st.reply(stanza):tag("query", { xmlns = "http://jabber.org/protocol/disco#info" }) |
| 123 :tag("identity", { category = "component", type = "generic", name = module:get_option_string("name", "Prosody") })) | 123 :tag("identity", { category = "component", type = "generic", name = module:get_option_string("name", "Prosody") })):up() |
| 124 :tag("feature", { var = "http://jabber.org/protocol/disco#info" }):up() | |
| 124 return true; | 125 return true; |
| 125 end | 126 end |
| 126 end | 127 end |
| 127 end | 128 end |
| 128 module:log("warn", "Component not connected, bouncing error for: %s", stanza:top_tag()); | 129 module:log("warn", "Component not connected, bouncing error for: %s", stanza:top_tag()); |
