Mercurial > prosody-hg
comparison plugins/mod_disco.lua @ 3792:1f9ab0fa77cc
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 |
| parents | c888328ae6b3 |
| children | d2c4856c7ed5 |
comparison
equal
deleted
inserted
replaced
| 3791:04c7b71ce078 | 3792:1f9ab0fa77cc |
|---|---|
| 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 |
