Software / code / prosody
Comparison
plugins/mod_invites_register.lua @ 12284:b4424f131d5c
mod_invites_register: Replace COMPAT hack
This hack is not needed since a9c975a0f113 so can be removed when
included with Prosody.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 10 Feb 2022 20:44:45 +0100 |
| parent | 12144:3e292e2a1e02 |
| child | 12285:ed23bbf3b946 |
comparison
equal
deleted
inserted
replaced
| 12283:b5686debb497 | 12284:b4424f131d5c |
|---|---|
| 6 local require_encryption = module:get_option_boolean("c2s_require_encryption", | 6 local require_encryption = module:get_option_boolean("c2s_require_encryption", |
| 7 module:get_option_boolean("require_encryption", false)); | 7 module:get_option_boolean("require_encryption", false)); |
| 8 local invite_only = module:get_option_boolean("registration_invite_only", true); | 8 local invite_only = module:get_option_boolean("registration_invite_only", true); |
| 9 | 9 |
| 10 local invites; | 10 local invites; |
| 11 if prosody.shutdown then -- COMPAT hack to detect prosodyctl | 11 if prosody.process_type == "prosody" then |
| 12 invites = module:depends("invites"); | 12 invites = module:depends("invites"); |
| 13 end | 13 end |
| 14 | 14 |
| 15 local legacy_invite_stream_feature = st.stanza("register", { xmlns = "urn:xmpp:invite" }):up(); | 15 local legacy_invite_stream_feature = st.stanza("register", { xmlns = "urn:xmpp:invite" }):up(); |
| 16 local invite_stream_feature = st.stanza("register", { xmlns = "urn:xmpp:ibr-token:0" }):up(); | 16 local invite_stream_feature = st.stanza("register", { xmlns = "urn:xmpp:ibr-token:0" }):up(); |