# HG changeset patch # User Kim Alvefur # Date 1527832992 -7200 # Node ID cd186331ab1fd424f52d11f11956903ff47650c5 # Parent 402d8febfa4368b9ffd7cdbfd3911292ca3c34f0 MUC: Advertise room subject in disco#info diff -r 402d8febfa43 -r cd186331ab1f plugins/muc/subject.lib.lua --- a/plugins/muc/subject.lib.lua Fri Jun 01 08:02:43 2018 +0200 +++ b/plugins/muc/subject.lib.lua Fri Jun 01 08:03:12 2018 +0200 @@ -73,6 +73,13 @@ return true; end +module:hook("muc-disco#info", function (event) + table.insert(event.form, { + name = "muc#roominfo_subject"; + }); + event.formdata["muc#roominfo_subject"] = select(2, get_subject(event.room)); +end); + -- Send subject to joining user module:hook("muc-occupant-session-new", function(event) send_subject(event.room, event.stanza.attr.from);