# HG changeset patch # User daurnimator # Date 1397838007 14400 # Node ID 4968d18e2c1e29e4b1016f9ab952ceccc025b1de # Parent bb75c011b15e06a83926c45fe1c08a12c07a9257 plugins/muc/subject.lib: If subject is not set by an occupant, it should come from room jid itself diff -r bb75c011b15e -r 4968d18e2c1e plugins/muc/subject.lib.lua --- a/plugins/muc/subject.lib.lua Fri Apr 18 12:19:33 2014 -0400 +++ b/plugins/muc/subject.lib.lua Fri Apr 18 12:20:07 2014 -0400 @@ -43,7 +43,8 @@ end); local function get_subject(room) - return room._data.subject_from, room._data.subject; + -- a stanza from the room JID (or from the occupant JID of the entity that set the subject) + return room._data.subject_from or room.jid, room._data.subject; end local function send_subject(room, to) @@ -66,7 +67,7 @@ -- Send subject to joining user module:hook("muc-occupant-joined", function(event) - event.room:send_subject(event.stanza.attr.from); + send_subject(event.room, event.stanza.attr.from); end, 20); -- Role check for subject changes