# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1550542505 -3600
# Node ID 228e59bee8ad0eabf7c55dd30d6a222a36cb77d7
# Parent  741886d5d84f4d23165b86b30150489b1fd0d441
mod_storage_muc_log: Return 'with' property for items (API conformance)

diff -r 741886d5d84f -r 228e59bee8ad mod_storage_muc_log/mod_storage_muc_log.lua
--- a/mod_storage_muc_log/mod_storage_muc_log.lua	Fri Feb 15 12:28:12 2019 +0100
+++ b/mod_storage_muc_log/mod_storage_muc_log.lua	Tue Feb 19 03:15:05 2019 +0100
@@ -135,12 +135,13 @@
 						if item then
 							time = item.attr.time;
 							item = item.tags[1];
+							local with = st_with(item);
 							if (today >= start_date or time >= start_time) and
 								(today <= end_date or time <= end_time) and
-								(not query_with or query_with == st_with(item)) and
+								(not query_with or query_with == with) and
 								item:get_child_text("alreadyJoined") ~= "true" then
 								matches = matches + 1;
-								coroutine.yield(today.."_"..i, item, parse_silly(today, time));
+								coroutine.yield(today.."_"..i, item, parse_silly(today, time), with);
 								if query_limit and matches >= query_limit then
 									return;
 								end