comparison mod_muc_rai/mod_muc_rai.lua @ 4060:b44620cacb11

mod_muc_rai: Add debug logging
author Matthew Wild <mwild1@gmail.com>
date Thu, 02 Jul 2020 12:20:55 +0100
parents 072366857d79
children 4b84beb48ba0
comparison
equal deleted inserted replaced
4059:072366857d79 4060:b44620cacb11
125 end 125 end
126 126
127 local function has_new_activity(room_jid, user_jid) 127 local function has_new_activity(room_jid, user_jid)
128 local last_room_message_id = get_last_room_message_id(room_jid); 128 local last_room_message_id = get_last_room_message_id(room_jid);
129 local last_user_read_id = get_last_user_read_id(user_jid, room_jid); 129 local last_user_read_id = get_last_user_read_id(user_jid, room_jid);
130 module:log("debug", "Checking activity in <%s> (%s) for <%s> (%s): %s",
131 room_jid, last_room_message_id,
132 user_jid, last_user_read_id,
133 tostring(last_room_message_id ~= last_user_read_id)
134 );
130 return last_room_message_id ~= last_user_read_id; 135 return last_room_message_id ~= last_user_read_id;
131 end 136 end
132 137
133 -- Returns a set of rooms that a user is interested in 138 -- Returns a set of rooms that a user is interested in
134 local function get_interested_rooms(user_jid) 139 local function get_interested_rooms(user_jid)