Software / code / prosody
Annotate
plugins/muc/config_form_sections.lib.lua @ 13078:6da83deb8d7f 0.12
util.error: Fix error on conversion of invalid error stanza, fix #1805
Error stanzas should have an <error> element, but if you pass a
stanza without one to util.error.from_stanza() it triggers an attempt to
index a nil value, which this patch avoids.
In the conditional, it should be safe to assume error_tag is non-nil
since condition can't have those values then.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 19 Apr 2023 11:32:53 +0200 |
| parent | 9036:bb4dcc555091 |
| rev | line source |
|---|---|
| 9036 | 1 module:hook("muc-config-form", function(event) |
| 2 table.insert(event.form, { | |
| 3 type = "fixed"; | |
| 4 value = "Room information"; | |
| 5 }); | |
| 6 end, 100); | |
| 7 | |
| 8 module:hook("muc-config-form", function(event) | |
| 9 table.insert(event.form, { | |
| 10 type = "fixed"; | |
| 11 value = "Access to the room"; | |
| 12 }); | |
| 13 end, 90); | |
| 14 | |
| 15 module:hook("muc-config-form", function(event) | |
| 16 table.insert(event.form, { | |
| 17 type = "fixed"; | |
| 18 value = "Permissions in the room"; | |
| 19 }); | |
| 20 end, 80); | |
| 21 | |
| 22 module:hook("muc-config-form", function(event) | |
| 23 table.insert(event.form, { | |
| 24 type = "fixed"; | |
| 25 value = "Other options"; | |
| 26 }); | |
| 27 end, 70); |