projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
MUC: Send participant list and subject on explicit joins (thanks daurnimator)
[prosody.git]
/
plugins
/
muc
/
name.lib.lua
diff --git
a/plugins/muc/name.lib.lua
b/plugins/muc/name.lib.lua
index 302c29924949d569a492f6a3f00ff1b3136ccc6c..2dcb979a244de5cd807e1253c15405e411d5c252 100644
(file)
--- a/
plugins/muc/name.lib.lua
+++ b/
plugins/muc/name.lib.lua
@@
-17,7
+17,6
@@
local function set_name(room, name)
if name == "" or name == (jid_split(room.jid)) then name = nil; end
if room._data.name == name then return false; end
room._data.name = name;
if name == "" or name == (jid_split(room.jid)) then name = nil; end
if room._data.name == name then return false; end
room._data.name = name;
- if room.save then room:save(true); end
return true;
end
return true;
end
@@
-30,9
+29,9
@@
module:hook("muc-config-form", function(event)
name = "muc#roomconfig_roomname";
type = "text-single";
label = "Name";
name = "muc#roomconfig_roomname";
type = "text-single";
label = "Name";
+ value = get_name(event.room) or "";
});
});
- event.formdata["muc#roomconfig_roomname"] = get_name(event.room) or "";
-end);
+end, 100-1);
module:hook("muc-config-submitted/muc#roomconfig_roomname", function(event)
if set_name(event.room, event.value) then
module:hook("muc-config-submitted/muc#roomconfig_roomname", function(event)
if set_name(event.room, event.value) then