aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-07-20 17:39:02 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-07-20 17:39:02 +0500
commitdd4d7c05b28c61bd9f6342549e18335d40a913e3 (patch)
treed2079424293ef358896ab354aa39e18bfe748b15 /plugins/muc
parent9a9e9b1c1ab8bf74b50686ee5ecb750aec275cbf (diff)
downloadprosody-dd4d7c05b28c61bd9f6342549e18335d40a913e3.tar.gz
prosody-dd4d7c05b28c61bd9f6342549e18335d40a913e3.zip
MUC: Store the nick (full room JID) which set the subject, and send subject to occupants from that JID.
Diffstat (limited to 'plugins/muc')
-rw-r--r--plugins/muc/muc.lib.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua
index e679f9fe..9cdf4d18 100644
--- a/plugins/muc/muc.lib.lua
+++ b/plugins/muc/muc.lib.lua
@@ -206,7 +206,7 @@ function room_mt:send_history(to, stanza)
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 @@ function room_mt:set_subject(current_nick, subject)
-- 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();