# HG changeset patch # User Kim Alvefur # Date 1460999350 -7200 # Node ID 2d502878b78407a6cbfa71c8caf0e13a83215fed # Parent 9ea3094b1fca823e30ff36586f632467bea3217a MUC/subject: Fix reference to room for save call (self, not room) diff -r 9ea3094b1fca -r 2d502878b784 plugins/muc/subject.lib.lua --- a/plugins/muc/subject.lib.lua Mon Apr 18 19:08:31 2016 +0200 +++ b/plugins/muc/subject.lib.lua Mon Apr 18 19:09:10 2016 +0200 @@ -76,12 +76,13 @@ local stanza = event.stanza; local subject = stanza:get_child("subject"); if subject then + local room = event.room; local occupant = event.occupant; -- Role check for subject changes local role_rank = valid_roles[occupant and occupant.role or "none"]; if role_rank >= valid_roles.moderator or - ( role_rank >= valid_roles.participant and get_changesubject(event.room) ) then -- and participant - set_subject(event.room, occupant.nick, subject:get_text()); + ( role_rank >= valid_roles.participant and get_changesubject(room) ) then -- and participant + set_subject(room, occupant.nick, subject:get_text()); room:save(); return true; else