Changeset

318:598552fc085b

plugins.carbons: Update to Carbons v0.8
author Kim Alvefur <zash@zash.se>
date Sat, 22 Dec 2012 17:53:40 +0100
parents 317:38562b0b50f2
children 319:12b0e5cc72bf
files plugins/carbons.lua
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/carbons.lua	Mon Dec 17 12:47:25 2012 +0100
+++ b/plugins/carbons.lua	Sat Dec 22 17:53:40 2012 +0100
@@ -1,6 +1,6 @@
 local verse = require "verse";
 
-local xmlns_carbons = "urn:xmpp:carbons:1";
+local xmlns_carbons = "urn:xmpp:carbons:2";
 local xmlns_forward = "urn:xmpp:forward:0";
 local os_time = os.time;
 local parse_datetime = require "util.datetime".parse;
@@ -47,10 +47,10 @@
 	end);
 
 	stream:hook("message", function(stanza)
-		local carbon_dir = stanza:get_child(nil, xmlns_carbons);
-		if stanza.attr.from == my_bare and carbon_dir then
-			carbon_dir = carbon_dir.name;
-			local fwd = stanza:get_child("forwarded", xmlns_forward);
+		local carbon = stanza:get_child(nil, xmlns_carbons);
+		if stanza.attr.from == my_bare and carbon then
+			local carbon_dir = carbon.name;
+			local fwd = carbon:get_child("forwarded", xmlns_forward);
 			local fwd_stanza = fwd and fwd:get_child("message", "jabber:client");
 			local delay = fwd:get_child("delay", "urn:xmpp:delay");
 			local stamp = delay and delay.attr.stamp;