Mercurial > prosody-hg
comparison plugins/muc/description.lib.lua @ 7352:50b24b3476e6
MUC: Provide a noop stub room:save() method
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 14 Apr 2016 21:23:09 +0200 |
| parents | a0764a8d6b26 |
| children | ca31d3271cf8 |
comparison
equal
deleted
inserted
replaced
| 7350:24e2369b67f9 | 7352:50b24b3476e6 |
|---|---|
| 13 | 13 |
| 14 local function set_description(room, description) | 14 local function set_description(room, description) |
| 15 if description == "" then description = nil; end | 15 if description == "" then description = nil; end |
| 16 if get_description(room) == description then return false; end | 16 if get_description(room) == description then return false; end |
| 17 room._data.description = description; | 17 room._data.description = description; |
| 18 if room.save then room:save(true); end | 18 room:save(true); |
| 19 return true; | 19 return true; |
| 20 end | 20 end |
| 21 | 21 |
| 22 local function add_form_option(event) | 22 local function add_form_option(event) |
| 23 table.insert(event.form, { | 23 table.insert(event.form, { |
