Changeset

193:fa6e1e65cb3c

plugins.pubsub: Fix to use :childtags() for iterating through items in a pubsub notification (:matching_tags() was removed from Prosody)
author Matthew Wild <mwild1@gmail.com>
date Mon, 14 Mar 2011 15:17:32 +0000
parents 192:d20feb8034f5
children 194:651c696e0b21
files plugins/pubsub.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/pubsub.lua	Wed Mar 09 18:38:24 2011 +0100
+++ b/plugins/pubsub.lua	Mon Mar 14 15:17:32 2011 +0000
@@ -10,11 +10,11 @@
 function verse.plugins.pubsub(stream)
 	stream.pubsub = setmetatable({ stream = stream }, pubsub_mt);
 	stream:hook("message", function (message)
-		for pubsub_event in message:matching_tags("event", xmlns_pubsub_event) do
+		for pubsub_event in message:childtags("event", xmlns_pubsub_event) do
 			local items = pubsub_event:get_child("items");
 			if items then
 				local node = items.attr.node;
-				for item in items:matching_tags("item") do
+				for item in items:childtags("item") do
 					stream:event("pubsub/event", {
 						from = message.attr.from;
 						node = node;