Mercurial > prosody-hg
comparison plugins/mod_pubsub.lua @ 5443:92615cfa2270
mod_pubsub: Don't attempt to handle iq stanzas with no action element
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 08 Apr 2013 15:04:55 +0100 |
| parents | e28fca8faf62 |
| children | 9054b51e71a4 |
comparison
equal
deleted
inserted
replaced
| 5441:6a5c622cc6d4 | 5443:92615cfa2270 |
|---|---|
| 20 | 20 |
| 21 function handle_pubsub_iq(event) | 21 function handle_pubsub_iq(event) |
| 22 local origin, stanza = event.origin, event.stanza; | 22 local origin, stanza = event.origin, event.stanza; |
| 23 local pubsub = stanza.tags[1]; | 23 local pubsub = stanza.tags[1]; |
| 24 local action = pubsub.tags[1]; | 24 local action = pubsub.tags[1]; |
| 25 if not action then return; end | |
| 25 local handler = handlers[stanza.attr.type.."_"..action.name]; | 26 local handler = handlers[stanza.attr.type.."_"..action.name]; |
| 26 if handler then | 27 if handler then |
| 27 handler(origin, stanza, action); | 28 handler(origin, stanza, action); |
| 28 return true; | 29 return true; |
| 29 end | 30 end |
