Software /
code /
prosody
Comparison
plugins/mod_component.lua @ 8508:47115b0ca133
mod_component: Advertise disco#info in fallback handling of disco#info query (fixes #1062)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 06 Jan 2018 08:54:15 +0100 |
parent | 8234:97b3ca502547 |
child | 8518:0de0018bdf91 |
child | 8886:9aa35cb939ac |
comparison
equal
deleted
inserted
replaced
8496:9b81c22d5b54 | 8508:47115b0ca133 |
---|---|
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()); |