Mercurial > prosody-hg
comparison plugins/mod_blocklist.lua @ 10054:0656bd283fa2
mod_blocklist: Add comment to clarify some logic
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 20 Jun 2019 21:44:43 +0200 |
| parents | 4b2cc8a60449 |
| children | 0f335815244f |
comparison
equal
deleted
inserted
replaced
| 10053:4b2cc8a60449 | 10054:0656bd283fa2 |
|---|---|
| 187 return true; | 187 return true; |
| 188 end | 188 end |
| 189 | 189 |
| 190 if is_blocking then | 190 if is_blocking then |
| 191 for jid in pairs(send_unavailable) do | 191 for jid in pairs(send_unavailable) do |
| 192 -- Check that this JID isn't already blocked, i.e. this is not a change | |
| 192 if not blocklist[jid] then | 193 if not blocklist[jid] then |
| 193 for _, session in pairs(sessions[username].sessions) do | 194 for _, session in pairs(sessions[username].sessions) do |
| 194 if session.presence then | 195 if session.presence then |
| 195 module:send(st.presence({ type = "unavailable", to = jid, from = session.full_jid })); | 196 module:send(st.presence({ type = "unavailable", to = jid, from = session.full_jid })); |
| 196 end | 197 end |
