plugins/mod_pubsub.lua
changeset 5443 92615cfa2270
parent 5419 e28fca8faf62
child 5445 9054b51e71a4
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