Changeset

345:266a96ae4c0d

plugins.archive: Update for MAM 0.2
author Kim Alvefur <zash@zash.se>
date Sun, 30 Jun 2013 00:46:49 +0200
parents 344:ea668c47e1bd
children 346:f7854dd16ed3
files plugins/archive.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/archive.lua	Fri Jun 14 23:25:54 2013 +0200
+++ b/plugins/archive.lua	Sun Jun 30 00:46:49 2013 +0200
@@ -39,7 +39,8 @@
 		local function handle_archived_message(message)
 			local result_tag = message:get_child("result", xmlns_mam);
 			if result_tag and result_tag.attr.queryid == queryid then
-				local forwarded = message:get_child("forwarded", xmlns_forward);
+				local forwarded = result_tag:get_child("forwarded", xmlns_forward);
+				forwarded = forwarded or message:get_child("forwarded", xmlns_forward); -- COMPAT XEP-0313 pre 2013-05-31
 
 				local id = result_tag.attr.id;
 				local delay = forwarded:get_child("delay", xmlns_delay);