Mercurial > prosody-hg
comparison plugins/muc/name.lib.lua @ 11200:bf8f2da84007
Merge 0.11->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 05 Nov 2020 22:31:25 +0100 |
| parents | 13eee48071c8 |
| children |
comparison
equal
deleted
inserted
replaced
| 11199:6c7c50a4de32 | 11200:bf8f2da84007 |
|---|---|
| 5 -- | 5 -- |
| 6 -- This project is MIT/X11 licensed. Please see the | 6 -- This project is MIT/X11 licensed. Please see the |
| 7 -- COPYING file in the source package for more information. | 7 -- COPYING file in the source package for more information. |
| 8 -- | 8 -- |
| 9 | 9 |
| 10 local jid_split = require "util.jid".split; | |
| 11 | |
| 12 local function get_name(room) | 10 local function get_name(room) |
| 13 return room._data.name or jid_split(room.jid); | 11 return room._data.name; |
| 14 end | 12 end |
| 15 | 13 |
| 16 local function set_name(room, name) | 14 local function set_name(room, name) |
| 17 if name == "" then name = nil; end | 15 if name == "" then name = nil; end |
| 18 if room._data.name == name then return false; end | 16 if room._data.name == name then return false; end |
