affiliation_notify = affiliation_notify and true or nil;
if room._data.affiliation_notify == affiliation_notify then return false; end
room._data.affiliation_notify = affiliation_notify;
- room:save(true);
return true;
end
if description == "" then description = nil; end
if get_description(room) == description then return false; end
room._data.description = description;
- room:save(true);
return true;
end
hidden = hidden and true or nil;
if get_hidden(room) == hidden then return false; end
room._data.hidden = hidden;
- room:save(true);
return true;
end
module:fire_event("muc-occupant-left", {room = room; nick = occupant.nick; occupant = occupant;});
end
end
- room:save(true);
return true;
end
from, invitee, room.jid);
-- This might fail; ignore for now
room:set_affiliation(from, invitee, "member", "Invited by " .. from);
+ room:save();
end
end
end);
moderated = moderated and true or nil;
if get_moderated(room) == moderated then return false; end
room._data.moderated = moderated;
- room:save(true);
return true;
end
else
success, errtype, err = nil, "cancel", "bad-request";
end
+ room:save();
if not success then
origin.send(st.error_reply(stanza, errtype, err));
else
end
end
- if self.save then self:save(); end
+ self:save(true);
module:fire_event("muc-set-affiliation", {
room = self;
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;
- room:save(true);
return true;
end
if password == "" then password = nil; end
if room._data.password == password then return false; end
room._data.password = password;
- room:save(true);
return true;
end
persistent = persistent and true or nil;
if get_persistent(room) == persistent then return false; end
room._data.persistent = persistent;
- room:save(true);
return true;
end
changesubject = changesubject and true or nil;
if get_changesubject(room) == changesubject then return false; end
room._data.changesubject = changesubject;
- room:save(true);
return true;
end
if old_subject == subject and old_from == from then return false; end
room._data.subject_from = from;
room._data.subject = subject;
- room:save();
local msg = create_subject_message(from, subject);
room:broadcast_message(msg);
return true;
assert(valid_whois[whois], "Invalid whois value")
if get_whois(room) == whois then return false; end
room._data.whois = whois;
- room:save(true);
return true;
end