Mercurial > prosody-hg
comparison plugins/muc/name.lib.lua @ 7124:a0764a8d6b26
MUC: Roll back parts of 50b9a7e86de9 that were not in the disco#info event
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 04 Feb 2016 09:18:53 +0100 |
| parents | bb1adaabcff6 |
| children | 50b24b3476e6 |
comparison
equal
deleted
inserted
replaced
| 7123:a7ace4f32080 | 7124:a0764a8d6b26 |
|---|---|
| 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 ""; | |
| 33 }); | 34 }); |
| 34 event.formdata["muc#roomconfig_roomname"] = get_name(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; |
