Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 3393:5b8de0731c4d
MUC: Store the nick (full room JID) which set the subject, and send subject to occupants from that JID.
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Tue, 20 Jul 2010 17:39:02 +0500 |
parent | 3361:8d4e7c231d3e |
child | 3445:2fde9cb97f76 |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Tue Jul 20 12:37:28 2010 +0100 +++ b/plugins/muc/muc.lib.lua Tue Jul 20 17:39:02 2010 +0500 @@ -206,7 +206,7 @@ end end if self._data['subject'] then - self:_route_stanza(st.message({type='groupchat', from=self.jid, to=to}):tag("subject"):text(self._data['subject'])); + self:_route_stanza(st.message({type='groupchat', from=self._data['subject_from'] or self.jid, to=to}):tag("subject"):text(self._data['subject'])); end end @@ -233,6 +233,7 @@ -- TODO check nick's authority if subject == "" then subject = nil; end self._data['subject'] = subject; + self._data['subject_from'] = current_nick; if self.save then self:save(); end local msg = st.message({type='groupchat', from=current_nick}) :tag('subject'):text(subject):up();