Mercurial > prosody-modules
comparison mod_minimix/mod_minimix.lua @ 3119:f84a6ad72548
mod_minimix: Handle missing subject
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 19 Jun 2018 18:56:57 +0200 |
parents | 24e49391d4e8 |
children | b914ee44b49f |
comparison
equal
deleted
inserted
replaced
3118:24e49391d4e8 | 3119:f84a6ad72548 |
---|---|
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 for _, pres in pairs(presences) do |
36 origin.send(st.clone(pres)); | 36 origin.send(st.clone(pres)); |
37 end | 37 end |
38 -- FIXME should send ones own presence last | 38 -- FIXME should send ones own presence last |
39 origin.send(st.clone(data:get(username, room_jid, "subject"))); | 39 local subject = data:get(username, room_jid, "subject"); |
40 if subject then | |
41 origin.send(st.clone(subject)); | |
42 end | |
40 -- Send on-join stanzas from local state, somehow | 43 -- Send on-join stanzas from local state, somehow |
41 -- Maybe tell them their nickname was changed if it doesn't match the account one | 44 -- Maybe tell them their nickname was changed if it doesn't match the account one |
42 return true; | 45 return true; |
43 end | 46 end |
44 | 47 |