Software / code / prosody
Comparison
plugins/mod_disco.lua @ 3665:98b55c3a3deb
mod_disco: Fixed: Service discovery features were not being removed on module unload (issue #205).
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Sun, 28 Nov 2010 07:56:08 +0500 |
| parent | 3600:c888328ae6b3 |
| child | 3695:d2c4856c7ed5 |
comparison
equal
deleted
inserted
replaced
| 3664:345cd1e04e80 | 3665:98b55c3a3deb |
|---|---|
| 79 return _cached_server_caps_hash; | 79 return _cached_server_caps_hash; |
| 80 end | 80 end |
| 81 | 81 |
| 82 module:hook("item-added/identity", clear_disco_cache); | 82 module:hook("item-added/identity", clear_disco_cache); |
| 83 module:hook("item-added/feature", clear_disco_cache); | 83 module:hook("item-added/feature", clear_disco_cache); |
| 84 module:hook("item-removed/identity", clear_disco_cache); | |
| 85 module:hook("item-removed/feature", clear_disco_cache); | |
| 84 | 86 |
| 85 -- Handle disco requests to the server | 87 -- Handle disco requests to the server |
| 86 module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(event) | 88 module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(event) |
| 87 local origin, stanza = event.origin, event.stanza; | 89 local origin, stanza = event.origin, event.stanza; |
| 88 if stanza.attr.type ~= "get" then return; end | 90 if stanza.attr.type ~= "get" then return; end |