Mercurial > prosody-modules
comparison mod_minimix/mod_minimix.lua @ 3123:f4e86d2662ec
mod_minimix: Handle having received no presence (should not happen)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 19 Jun 2018 22:00:17 +0200 |
| parents | c69f32c9c576 |
| children | cabe58ae17c9 |
comparison
equal
deleted
inserted
replaced
| 3122:c69f32c9c576 | 3123:f4e86d2662ec |
|---|---|
| 30 end | 30 end |
| 31 | 31 |
| 32 if data:get(username, room_jid, "subject") then | 32 if data:get(username, room_jid, "subject") then |
| 33 module:log("debug", "Already joined to %s as %s", room_jid, nickname); | 33 module:log("debug", "Already joined to %s as %s", room_jid, nickname); |
| 34 local presences = data:get(username, room_jid, "presence"); | 34 local presences = data:get(username, room_jid, "presence"); |
| 35 for _, pres in pairs(presences) do | 35 if presences then |
| 36 origin.send(st.clone(pres)); | 36 -- Joined but no presence? Weird |
| 37 for _, pres in pairs(presences) do | |
| 38 origin.send(st.clone(pres)); | |
| 39 end | |
| 37 end | 40 end |
| 38 -- FIXME should send ones own presence last | 41 -- FIXME should send ones own presence last |
| 39 local subject = data:get(username, room_jid, "subject"); | 42 local subject = data:get(username, room_jid, "subject"); |
| 40 if subject then | 43 if subject then |
| 41 origin.send(st.clone(subject)); | 44 origin.send(st.clone(subject)); |
