#694 mod_blocking not blocking incomming messages from blocked contacts
What steps will reproduce the problem?
1. connect to a 0.9.x prosody with mod_privacy and mod_blocking enabled
2. using a client that supports xep-0191 but does not support xep-0016 (e.g. conversations)
3. block a contact
4. send messages from the blocked contact
What is the expected output? What do you see instead?
would expect no incoming messages from blocked contacts accepted
but instead incoming messages are accpeted from blocked contacts (conversations is reporting the contact is blocking but the messages goes thru)
To prove it's not a client issue we tested using conversations with prosody 0.10 that has mod_blocklist enabled (instead of mod_blocking) and mod_privacy disabled (to avoid fallback to xep-00116)
Result: mod_blocklists under 0.10 works fine with conversations, mod_blocking together with mod_privacy does not work for xep-0191 clients and will fallback to xep-0016.
When receiving a message to the bare jid, mod_privacy attempts to select the session with the highest priority and applies privacy lists based on that. The selection algorithm would fail if no session had priority over 0.
Fixed in 94af49ad657e