Software /
code /
prosody
Comparison
plugins/mod_muc_mam.lua @ 10111:0f335815244f
plugins: Remove tostring call from logging
Taken care of by loggingmanager now
Mass-rewrite using lua pattern like `tostring%b()`
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 30 Jul 2019 02:29:36 +0200 |
parent | 10030:98ef41a60fc3 |
child | 10119:29733134c76c |
comparison
equal
deleted
inserted
replaced
10110:3fa3872588a8 | 10111:0f335815244f |
---|---|
249 end | 249 end |
250 first, last = last, first; | 250 first, last = last, first; |
251 end | 251 end |
252 | 252 |
253 -- That's all folks! | 253 -- That's all folks! |
254 module:log("debug", "Archive query %s completed", tostring(qid)); | 254 module:log("debug", "Archive query %s completed", qid); |
255 | 255 |
256 origin.send(st.reply(stanza) | 256 origin.send(st.reply(stanza) |
257 :tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete }) | 257 :tag("fin", { xmlns = xmlns_mam, queryid = qid, complete = complete }) |
258 :add_child(rsm.generate { | 258 :add_child(rsm.generate { |
259 first = first, last = last, count = total })); | 259 first = first, last = last, count = total })); |
289 with = "message<groupchat"; | 289 with = "message<groupchat"; |
290 } | 290 } |
291 local data, err = archive:find(jid_split(room_jid), query); | 291 local data, err = archive:find(jid_split(room_jid), query); |
292 | 292 |
293 if not data then | 293 if not data then |
294 module:log("error", "Could not fetch history: %s", tostring(err)); | 294 module:log("error", "Could not fetch history: %s", err); |
295 return | 295 return |
296 end | 296 end |
297 | 297 |
298 local history, i = {}, 1; | 298 local history, i = {}, 1; |
299 | 299 |
315 break | 315 break |
316 end | 316 end |
317 maxchars = maxchars - chars; | 317 maxchars = maxchars - chars; |
318 end | 318 end |
319 history[i], i = item, i+1; | 319 history[i], i = item, i+1; |
320 -- module:log("debug", tostring(item)); | 320 -- module:log("debug", item); |
321 end | 321 end |
322 function event.next_stanza() | 322 function event.next_stanza() |
323 i = i - 1; | 323 i = i - 1; |
324 return history[i]; | 324 return history[i]; |
325 end | 325 end |