aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/muc.lib.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-09-28 16:36:17 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-09-28 16:36:17 +0500
commitec28fe98377d225e2c19fb3e2e4d5757a3322d3e (patch)
tree9081d68256cde7f5a6e6ee84982cb98d1c3a7619 /plugins/muc/muc.lib.lua
parent1a415139e5c71d58f7971b4850299d575e853221 (diff)
downloadprosody-ec28fe98377d225e2c19fb3e2e4d5757a3322d3e.tar.gz
prosody-ec28fe98377d225e2c19fb3e2e4d5757a3322d3e.zip
MUC: Make the room node be the default room name (thanks Zash).
Diffstat (limited to 'plugins/muc/muc.lib.lua')
-rw-r--r--plugins/muc/muc.lib.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index 0752abc0..a3163349 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -260,14 +260,14 @@ local function build_unavailable_presence_from_error(stanza)
end
function room_mt:set_name(name)
- if name == "" or type(name) ~= "string" then name = nil; end
+ if name == "" or type(name) ~= "string" or name == (jid_split(self.jid)) then name = nil; end
if self._data.name ~= name then
self._data.name = name;
if self.save then self:save(true); end
end
end
function room_mt:get_name()
- return self._data.name;
+ return self._data.name or jid_split(self.jid);
end
function room_mt:set_description(description)
if description == "" or type(description) ~= "string" then description = nil; end