diff plugins/muc/name.lib.lua @ 11057:13eee48071c8

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.
author Kim Alvefur <zash@zash.se>
date Sat, 29 Aug 2020 18:51:13 +0200
parents 1c709e3d2e5e
children
line wrap: on
line diff
--- a/plugins/muc/name.lib.lua	Fri Aug 28 18:44:02 2020 +0200
+++ b/plugins/muc/name.lib.lua	Sat Aug 29 18:51:13 2020 +0200
@@ -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)