Mercurial > prosody-hg
comparison plugins/mod_muc_mam.lua @ 8725:ced09d7d7c96
mod_muc_mam: Save the MUC <x> on recorded join stanzas
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 24 Mar 2018 18:27:34 +0100 |
| parents | cfcc78c50905 |
| children | 79133eca0656 |
comparison
equal
deleted
inserted
replaced
| 8724:cfcc78c50905 | 8725:ced09d7d7c96 |
|---|---|
| 339 save_to_history(room, stanza); | 339 save_to_history(room, stanza); |
| 340 end); | 340 end); |
| 341 | 341 |
| 342 if module:get_option_boolean("muc_log_presences", true) then | 342 if module:get_option_boolean("muc_log_presences", true) then |
| 343 module:hook("muc-occupant-joined", function (event) | 343 module:hook("muc-occupant-joined", function (event) |
| 344 save_to_history(event.room, st.stanza("presence", { from = event.nick })); | 344 save_to_history(event.room, st.stanza("presence", { from = event.nick }):tag("x", { xmlns = "http://jabber.org/protocol/muc" })); |
| 345 end); | 345 end); |
| 346 module:hook("muc-occupant-left", function (event) | 346 module:hook("muc-occupant-left", function (event) |
| 347 save_to_history(event.room, st.stanza("presence", { type = "unavailable", from = event.nick })); | 347 save_to_history(event.room, st.stanza("presence", { type = "unavailable", from = event.nick })); |
| 348 end); | 348 end); |
| 349 end | 349 end |
