mod_map: Include last body text
authorKim Alvefur <zash@zash.se>
Fri, 23 Aug 2019 01:18:24 +0200
changeset 3656 d0c2f001735f
parent 3655 95f7291db669
child 3657 d31fa28d9482
mod_map: Include last body text Body, timestamp and message count allows showing modern conversation list UI without a full archive sync.
mod_map/mod_map.lua
--- a/mod_map/mod_map.lua	Fri Aug 23 01:16:58 2019 +0200
+++ b/mod_map/mod_map.lua	Fri Aug 23 01:18:24 2019 +0200
@@ -66,6 +66,9 @@
 		if summary.latest and summary.latest[jid] then
 			reply:text_tag("end", datetime(summary.latest[jid]));
 		end
+		if summary.body and summary.body[jid] then
+			reply:text_tag("body", summary.body[jid]);
+		end
 		reply:up();
 	end