Software /
code /
prosody
Comparison
plugins/muc/history.lib.lua @ 6231:bc12a8253f94
plugins/muc/muc.lib: Move sending of occupant list to joining user out of hook, and into main flow: It has to occur before publication of their status
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Mon, 21 Apr 2014 17:51:32 -0400 |
parent | 6215:1dd09dc04945 |
child | 6240:641756a6a5f7 |
comparison
equal
deleted
inserted
replaced
6230:97d53caef325 | 6231:bc12a8253f94 |
---|---|
129 end | 129 end |
130 | 130 |
131 -- Send history on join | 131 -- Send history on join |
132 module:hook("muc-occupant-joined", function(event) | 132 module:hook("muc-occupant-joined", function(event) |
133 send_history(event.room, event.stanza); | 133 send_history(event.room, event.stanza); |
134 end, 50); -- Between occupant list (80) and subject(20) | 134 end, 50); -- Before subject(20) |
135 | 135 |
136 -- add to history | 136 -- add to history |
137 module:hook("muc-broadcast-message", function(event) | 137 module:hook("muc-broadcast-message", function(event) |
138 local historic = event.stanza:get_child("body"); | 138 local historic = event.stanza:get_child("body"); |
139 if historic then | 139 if historic then |