Software /
code /
prosody
Comparison
plugins/muc/name.lib.lua @ 7119:50b9a7e86de9
MUC: Separate form data from form in disco#info event
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 03 Feb 2016 02:05:49 +0100 |
parent | 6991:84e01dbb739e |
child | 7121:bb1adaabcff6 |
comparison
equal
deleted
inserted
replaced
7116:ecba5fee4867 | 7119:50b9a7e86de9 |
---|---|
28 module:hook("muc-config-form", function(event) | 28 module:hook("muc-config-form", function(event) |
29 table.insert(event.form, { | 29 table.insert(event.form, { |
30 name = "muc#roomconfig_roomname"; | 30 name = "muc#roomconfig_roomname"; |
31 type = "text-single"; | 31 type = "text-single"; |
32 label = "Name"; | 32 label = "Name"; |
33 value = get_name(event.room) or ""; | |
34 }); | 33 }); |
34 event.formdata["muc#roomconfig_roomname"] = get_description(event.room) or ""; | |
35 end); | 35 end); |
36 | 36 |
37 module:hook("muc-config-submitted/muc#roomconfig_roomname", function(event) | 37 module:hook("muc-config-submitted/muc#roomconfig_roomname", function(event) |
38 if set_name(event.room, event.value) then | 38 if set_name(event.room, event.value) then |
39 event.status_codes["104"] = true; | 39 event.status_codes["104"] = true; |