Mercurial > prosody-modules
comparison mod_firewall/conditions.lib.lua @ 5534:7b4e0c3642bf
mod_firewall: Fix inverted logic of 'FROM FULL JID?'
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 08 Jun 2023 13:04:19 +0100 |
| parents | 8226ac08484e |
| children | eeccec0955a1 |
comparison
equal
deleted
inserted
replaced
| 5533:09311a8a3cfa | 5534:7b4e0c3642bf |
|---|---|
| 66 function condition_handlers.FROM(from) | 66 function condition_handlers.FROM(from) |
| 67 return compile_jid_match("from", from), { "split_from" }; | 67 return compile_jid_match("from", from), { "split_from" }; |
| 68 end | 68 end |
| 69 | 69 |
| 70 function condition_handlers.FROM_FULL_JID() | 70 function condition_handlers.FROM_FULL_JID() |
| 71 return compile_jid_match_part("from_resource", nil), { "split_from" }; | 71 return "not "..compile_jid_match_part("from_resource", nil), { "split_from" }; |
| 72 end | 72 end |
| 73 | 73 |
| 74 function condition_handlers.FROM_EXACTLY(from) | 74 function condition_handlers.FROM_EXACTLY(from) |
| 75 local metadeps = {}; | 75 local metadeps = {}; |
| 76 return ("from == %s"):format(metaq(from, metadeps)), { "from", unpack(metadeps) }; | 76 return ("from == %s"):format(metaq(from, metadeps)), { "from", unpack(metadeps) }; |
