Software /
code /
prosody
Comparison
plugins/mod_muc.lua @ 1140:76bd1bd14234
mod_muc: s/broadcast_history/send_history/ - since the cast isn't broad
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 08 May 2009 01:29:43 +0500 |
parent | 1139:ed4d43c3eaf2 |
child | 1141:9d9570516ce8 |
comparison
equal
deleted
inserted
replaced
1139:ed4d43c3eaf2 | 1140:76bd1bd14234 |
---|---|
203 stanza.attr.to = jid; | 203 stanza.attr.to = jid; |
204 core_route_stanza(component, stanza); | 204 core_route_stanza(component, stanza); |
205 end | 205 end |
206 end | 206 end |
207 end | 207 end |
208 function broadcast_history(room, to) | 208 function send_history(room, to) |
209 local history = rooms_info:get(room, 'history'); -- send discussion history | 209 local history = rooms_info:get(room, 'history'); -- send discussion history |
210 if history then | 210 if history then |
211 for _, msg in ipairs(history) do | 211 for _, msg in ipairs(history) do |
212 msg = st.deserialize(msg); | 212 msg = st.deserialize(msg); |
213 msg.attr.to=to; | 213 msg.attr.to=to; |
313 rooms:set(room, to, data); | 313 rooms:set(room, to, data); |
314 jid_nick:set(from, room, to); | 314 jid_nick:set(from, room, to); |
315 send_occupant_list(room, from); | 315 send_occupant_list(room, from); |
316 pr.attr.from = to; | 316 pr.attr.from = to; |
317 broadcast_presence_stanza(room, pr); | 317 broadcast_presence_stanza(room, pr); |
318 broadcast_history(room, from); | 318 send_history(room, from); |
319 end | 319 end |
320 end | 320 end |
321 elseif type ~= 'result' then -- bad type | 321 elseif type ~= 'result' then -- bad type |
322 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? | 322 origin.send(st.error_reply(stanza, "modify", "bad-request")); -- FIXME correct error? |
323 end | 323 end |