Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 3510:711eb5bf94b4
MUC: Make the room node be the default room name (thanks Zash).
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 28 Sep 2010 16:36:17 +0500 |
parent | 3509:72cb8b6536b9 |
child | 3516:de54a7ab7e6e |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Mon Sep 27 19:51:14 2010 +0500 +++ b/plugins/muc/muc.lib.lua Tue Sep 28 16:36:17 2010 +0500 @@ -260,14 +260,14 @@ 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