Mercurial > prosody-hg
comparison plugins/mod_disco.lua @ 3695:d2c4856c7ed5
mod_disco: Don't add caps hash to stream features on unauthenticated connections.
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Fri, 03 Dec 2010 00:37:54 +0500 |
| parents | 98b55c3a3deb |
| children | a2ee8ab82dd9 |
comparison
equal
deleted
inserted
replaced
| 3694:a7d88f58abbb | 3695:d2c4856c7ed5 |
|---|---|
| 113 return true; | 113 return true; |
| 114 end); | 114 end); |
| 115 | 115 |
| 116 -- Handle caps stream feature | 116 -- Handle caps stream feature |
| 117 module:hook("stream-features", function (event) | 117 module:hook("stream-features", function (event) |
| 118 event.features:add_child(get_server_caps_feature()); | 118 if event.origin.type == "c2s" then |
| 119 event.features:add_child(get_server_caps_feature()); | |
| 120 end | |
| 119 end); | 121 end); |
| 120 | 122 |
| 121 -- Handle disco requests to user accounts | 123 -- Handle disco requests to user accounts |
| 122 module:hook("iq/bare/http://jabber.org/protocol/disco#info:query", function(event) | 124 module:hook("iq/bare/http://jabber.org/protocol/disco#info:query", function(event) |
| 123 local origin, stanza = event.origin, event.stanza; | 125 local origin, stanza = event.origin, event.stanza; |
