Software /
code /
prosody
Comparison
plugins/muc/hidden.lib.lua @ 7401:e16b3fd0bd80
MUC: Assign priorities to config form hooks so they have a consistent order on each start
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 19 Apr 2016 20:31:39 +0200 |
parent | 7353:ca31d3271cf8 |
child | 9034:1c709e3d2e5e |
comparison
equal
deleted
inserted
replaced
7400:f1ff321178d4 | 7401:e16b3fd0bd80 |
---|---|
23 name = "muc#roomconfig_publicroom"; | 23 name = "muc#roomconfig_publicroom"; |
24 type = "boolean"; | 24 type = "boolean"; |
25 label = "Make Room Publicly Searchable?"; | 25 label = "Make Room Publicly Searchable?"; |
26 value = not get_hidden(event.room); | 26 value = not get_hidden(event.room); |
27 }); | 27 }); |
28 end); | 28 end, 100-5); |
29 | 29 |
30 module:hook("muc-config-submitted/muc#roomconfig_publicroom", function(event) | 30 module:hook("muc-config-submitted/muc#roomconfig_publicroom", function(event) |
31 if set_hidden(event.room, not event.value) then | 31 if set_hidden(event.room, not event.value) then |
32 event.status_codes["104"] = true; | 32 event.status_codes["104"] = true; |
33 end | 33 end |