comparison mod_storage_muc_log/mod_storage_muc_log.lua @ 3468:228e59bee8ad

mod_storage_muc_log: Return 'with' property for items (API conformance)
author Kim Alvefur <zash@zash.se>
date Tue, 19 Feb 2019 03:15:05 +0100
parents d0c4ecabf3f5
children 85b849d5ec88
comparison
equal deleted inserted replaced
3467:741886d5d84f 3468:228e59bee8ad
133 item, err = xml_parse(item); 133 item, err = xml_parse(item);
134 end 134 end
135 if item then 135 if item then
136 time = item.attr.time; 136 time = item.attr.time;
137 item = item.tags[1]; 137 item = item.tags[1];
138 local with = st_with(item);
138 if (today >= start_date or time >= start_time) and 139 if (today >= start_date or time >= start_time) and
139 (today <= end_date or time <= end_time) and 140 (today <= end_date or time <= end_time) and
140 (not query_with or query_with == st_with(item)) and 141 (not query_with or query_with == with) and
141 item:get_child_text("alreadyJoined") ~= "true" then 142 item:get_child_text("alreadyJoined") ~= "true" then
142 matches = matches + 1; 143 matches = matches + 1;
143 coroutine.yield(today.."_"..i, item, parse_silly(today, time)); 144 coroutine.yield(today.."_"..i, item, parse_silly(today, time), with);
144 if query_limit and matches >= query_limit then 145 if query_limit and matches >= query_limit then
145 return; 146 return;
146 end 147 end
147 end 148 end
148 elseif err then 149 elseif err then