equal
deleted
inserted
replaced
80 -- Role check for subject changes |
80 -- Role check for subject changes |
81 local role_rank = valid_roles[occupant and occupant.role or "none"]; |
81 local role_rank = valid_roles[occupant and occupant.role or "none"]; |
82 if role_rank >= valid_roles.moderator or |
82 if role_rank >= valid_roles.moderator or |
83 ( role_rank >= valid_roles.participant and get_changesubject(event.room) ) then -- and participant |
83 ( role_rank >= valid_roles.participant and get_changesubject(event.room) ) then -- and participant |
84 set_subject(event.room, occupant.nick, subject:get_text()); |
84 set_subject(event.room, occupant.nick, subject:get_text()); |
|
85 room:save(); |
85 return true; |
86 return true; |
86 else |
87 else |
87 event.origin.send(st.error_reply(stanza, "auth", "forbidden")); |
88 event.origin.send(st.error_reply(stanza, "auth", "forbidden")); |
88 return true; |
89 return true; |
89 end |
90 end |