Mercurial > prosody-hg
comparison plugins/mod_muc_mam.lua @ 9001:23070882f3d4
mod_muc_mam: Disable presence logging by default
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 09 Jul 2018 00:54:03 +0200 |
| parents | a9c3b15b9d37 |
| children | 87e25d352de3 |
comparison
equal
deleted
inserted
replaced
| 9000:4d64ff0719a6 | 9001:23070882f3d4 |
|---|---|
| 355 module:hook("muc-add-history", function (event) | 355 module:hook("muc-add-history", function (event) |
| 356 local room, stanza = event.room, event.stanza; | 356 local room, stanza = event.room, event.stanza; |
| 357 save_to_history(room, stanza); | 357 save_to_history(room, stanza); |
| 358 end); | 358 end); |
| 359 | 359 |
| 360 if module:get_option_boolean("muc_log_presences", true) then | 360 if module:get_option_boolean("muc_log_presences", false) then |
| 361 module:hook("muc-occupant-joined", function (event) | 361 module:hook("muc-occupant-joined", function (event) |
| 362 save_to_history(event.room, st.stanza("presence", { from = event.nick }):tag("x", { xmlns = "http://jabber.org/protocol/muc" })); | 362 save_to_history(event.room, st.stanza("presence", { from = event.nick }):tag("x", { xmlns = "http://jabber.org/protocol/muc" })); |
| 363 end); | 363 end); |
| 364 module:hook("muc-occupant-left", function (event) | 364 module:hook("muc-occupant-left", function (event) |
| 365 save_to_history(event.room, st.stanza("presence", { type = "unavailable", from = event.nick })); | 365 save_to_history(event.room, st.stanza("presence", { type = "unavailable", from = event.nick })); |
