comparison mod_muc_rai/mod_muc_rai.lua @ 4543:9377b5593cc7

mod_statistics_statsd: Remove obsolete module, use the newer built-in statsd provider
author Matthew Wild <mwild1@gmail.com>
date Sat, 17 Apr 2021 12:51:50 +0100
parents 6690586826e8
children
comparison
equal deleted inserted replaced
4542:fb4a50bf60f1 4543:9377b5593cc7
93 end 93 end
94 94
95 local function get_last_room_message_id(room_jid) 95 local function get_last_room_message_id(room_jid)
96 local last_room_message_id = room_activity_cache:get(room_jid); 96 local last_room_message_id = room_activity_cache:get(room_jid);
97 if last_room_message_id then 97 if last_room_message_id then
98 module:log("debug", "Last room message: %s (cached)", last_room_message_id);
98 return last_room_message_id; 99 return last_room_message_id;
99 end 100 end
100 101
101 -- Load all the data! 102 -- Load all the data!
102 local query = { 103 local query = {
111 return nil; 112 return nil;
112 end 113 end
113 114
114 local id = data(); 115 local id = data();
115 room_activity_cache:set(room_jid, id); 116 room_activity_cache:set(room_jid, id);
117 module:log("debug", "Last room message: %s (queried)", id);
116 return id; 118 return id;
117 end 119 end
118 120
119 local function update_room_activity(room_jid, last_id) 121 local function update_room_activity(room_jid, last_id)
120 room_activity_cache:set(room_jid, last_id); 122 room_activity_cache:set(room_jid, last_id);