Mercurial > prosody-modules
diff mod_muc_offline_delivery/mod_muc_offline_delivery.lua @ 4770:6ca2769da62a
mod_muc_offline_delivery: split name/var so that retrieval of form data works
The option is stored in the affiliation data as 'offline_delivery'.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 15 Nov 2021 15:29:02 +0000 |
parents | 8bd36bba2292 |
children | eb63890ae8fc |
line wrap: on
line diff
--- a/mod_muc_offline_delivery/mod_muc_offline_delivery.lua Fri Nov 12 03:29:39 2021 -0600 +++ b/mod_muc_offline_delivery/mod_muc_offline_delivery.lua Mon Nov 15 15:29:02 2021 +0000 @@ -1,14 +1,15 @@ local st = require "util.stanza"; module:add_item("muc-registration-field", { - name = "{http://tigase.org/protocol/muc}offline"; + name = "offline_delivery"; + var = "{http://tigase.org/protocol/muc}offline"; type = "boolean"; label = "Receive messages while not connected to the room"; value = false; }); module:hook("muc-registration-submitted", function (event) - local deliver_offline = event.submitted_data["{http://tigase.org/protocol/muc}offline"] or nil; + local deliver_offline = event.submitted_data.offline_delivery or nil; event.affiliation_data.offline_delivery = deliver_offline; end);