Mercurial > prosody-hg
comparison plugins/muc/persistent.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 |
| parents | ca31d3271cf8 |
| children | 326fedc1d3c6 |
comparison
equal
deleted
inserted
replaced
| 7400:f1ff321178d4 | 7401:e16b3fd0bd80 |
|---|---|
| 23 name = "muc#roomconfig_persistentroom"; | 23 name = "muc#roomconfig_persistentroom"; |
| 24 type = "boolean"; | 24 type = "boolean"; |
| 25 label = "Make Room Persistent?"; | 25 label = "Make Room Persistent?"; |
| 26 value = get_persistent(event.room); | 26 value = get_persistent(event.room); |
| 27 }); | 27 }); |
| 28 end); | 28 end, 100-3); |
| 29 | 29 |
| 30 module:hook("muc-config-submitted/muc#roomconfig_persistentroom", function(event) | 30 module:hook("muc-config-submitted/muc#roomconfig_persistentroom", function(event) |
| 31 if set_persistent(event.room, event.value) then | 31 if set_persistent(event.room, event.value) then |
| 32 event.status_codes["104"] = true; | 32 event.status_codes["104"] = true; |
| 33 end | 33 end |
