aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/name.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-08-29 18:51:13 +0200
committerKim Alvefur <zash@zash.se>2020-08-29 18:51:13 +0200
commit1cec1146460848a60dca8ebc85c97d7c45544c65 (patch)
treef0bfa0a761b2ac4ea2966085914276e9f120e68a /plugins/muc/name.lib.lua
parentb37e985f4871fd2816c315d74869b08a5eb17b9d (diff)
downloadprosody-1cec1146460848a60dca8ebc85c97d7c45544c65.tar.gz
prosody-1cec1146460848a60dca8ebc85c97d7c45544c65.zip
MUC: Don't default room name to JID localpart (API breaking change)
Behavior with turning empty name into localpart was originally introduced in 711eb5bf94b4 This has caused some problems for clients, making it difficult to differentiate between a room actually named like the localpart from a room without a name. Breaking: The function signature of the :get_name() method changes from always returning a string to optional string.
Diffstat (limited to 'plugins/muc/name.lib.lua')
-rw-r--r--plugins/muc/name.lib.lua4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/muc/name.lib.lua b/plugins/muc/name.lib.lua
index 37fe1259..5d73e74d 100644
--- a/plugins/muc/name.lib.lua
+++ b/plugins/muc/name.lib.lua
@@ -7,10 +7,8 @@
-- COPYING file in the source package for more information.
--
-local jid_split = require "util.jid".split;
-
local function get_name(room)
- return room._data.name or jid_split(room.jid);
+ return room._data.name;
end
local function set_name(room, name)