Software /
code /
prosody
Changeset
8849:cd186331ab1f
MUC: Advertise room subject in disco#info
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 01 Jun 2018 08:03:12 +0200 |
parents | 8848:402d8febfa43 |
children | 8850:26f1a49fa9c0 |
files | plugins/muc/subject.lib.lua |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);