diff options
author | Kim Alvefur <zash@zash.se> | 2014-01-18 18:11:13 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-01-18 18:11:13 +0100 |
commit | 536ebc5d819144f62f52b7c8346fd9be7ce627d5 (patch) | |
tree | d63600780116cd32ea8401bf9b4aaadaf9502ca4 /plugins/muc | |
parent | e6f67faff5abdce89bfa8c8633a2b67676deb65a (diff) | |
download | prosody-536ebc5d819144f62f52b7c8346fd9be7ce627d5.tar.gz prosody-536ebc5d819144f62f52b7c8346fd9be7ce627d5.zip |
MUC: Split out sending of the topic into method separate from sending history
Diffstat (limited to 'plugins/muc')
-rw-r--r-- | plugins/muc/muc.lib.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index ac04eb54..462d6893 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -187,6 +187,8 @@ function room_mt:send_history(to, stanza) self:_route_stanza(msg); end end +end +function room_mt:send_subject(to) if self._data['subject'] then self:_route_stanza(st.message({type='groupchat', from=self._data['subject_from'] or self.jid, to=to}):tag("subject"):text(self._data['subject'])); end @@ -516,6 +518,7 @@ function room_mt:handle_to_occupant(origin, stanza) -- PM, vCards, etc pr.attr.to = from; self:_route_stanza(pr); self:send_history(from, stanza); + self:send_subject(from); elseif not affiliation then -- registration required for entering members-only room local reply = st.error_reply(stanza, "auth", "registration-required"):up(); reply.tags[1].attr.code = "407"; |