Changeset

4060:b44620cacb11

mod_muc_rai: Add debug logging
author Matthew Wild <mwild1@gmail.com>
date Thu, 02 Jul 2020 12:20:55 +0100
parents 4059:072366857d79
children 4061:9745a623c7ed
files mod_muc_rai/mod_muc_rai.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_muc_rai/mod_muc_rai.lua	Thu Jul 02 12:18:35 2020 +0100
+++ b/mod_muc_rai/mod_muc_rai.lua	Thu Jul 02 12:20:55 2020 +0100
@@ -127,6 +127,11 @@
 local function has_new_activity(room_jid, user_jid)
 	local last_room_message_id = get_last_room_message_id(room_jid);
 	local last_user_read_id = get_last_user_read_id(user_jid, room_jid);
+	module:log("debug", "Checking activity in <%s> (%s) for <%s> (%s): %s",
+		room_jid, last_room_message_id,
+		user_jid, last_user_read_id,
+		tostring(last_room_message_id ~= last_user_read_id)
+	);
 	return last_room_message_id ~= last_user_read_id;
 end