Comparison

plugins/mod_muc_mam.lua @ 10817:7c503938ce1d

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Sat, 09 May 2020 00:48:22 +0200
parent 10800:62794e065e33
parent 10815:c432b7172fa3
child 10835:e402f808de50
comparison
equal deleted inserted replaced
10813:4a9ff4f61796 10817:7c503938ce1d
334 return history[i]; 334 return history[i];
335 end 335 end
336 return true; 336 return true;
337 end, 1); 337 end, 1);
338 338
339 module:hook("muc-broadcast-messages", function (event) 339 module:hook("muc-broadcast-message", function (event)
340 local room, stanza = event.room, event.stanza; 340 local room, stanza = event.room, event.stanza;
341 341
342 -- Filter out <stanza-id> that claim to be from us 342 -- Filter out <stanza-id> that claim to be from us
343 stanza:maptags(function (tag) 343 stanza:maptags(function (tag)
344 if tag.name == "stanza-id" and tag.attr.xmlns == xmlns_st_id 344 if tag.name == "stanza-id" and tag.attr.xmlns == xmlns_st_id
444 444
445 module:hook("muc-disco#info", function(event) 445 module:hook("muc-disco#info", function(event)
446 if archiving_enabled(event.room) then 446 if archiving_enabled(event.room) then
447 event.reply:tag("feature", {var=xmlns_mam}):up(); 447 event.reply:tag("feature", {var=xmlns_mam}):up();
448 end 448 end
449 event.reply:tag("feature", {var=xmlns_st_id}):up();
449 end); 450 end);
450 451
451 -- Cleanup 452 -- Cleanup
452 453
453 if cleanup_after ~= "never" then 454 if cleanup_after ~= "never" then