Do not deliver offline messages to clients with negative priority
http://tools.ietf.org/html/rfc3921#page-86 reads: "the server MUST NOT deliver the stanza to an available resource with a negative priority"
According to the bug report Openfire does deliver the messages when a client logs in, even if tit has a negative priority.
RFC 6121 has the same constraint in 126.96.36.199.1. Message
Tested with 3.10 and it was still an issue.
XEP-0160 also forbids this behavior.
I made the change there simply because I wasn't 100% sure of the contract of canFloodOfflineMessages() and how changes to it might affect it's callers, and I didn't have the time or resources to confirm this on my project.
But these constraints don't apply here, so you're right of course, the check should be in canFloodOfflineMessages()
Simon, why did you choose to implement this as a check that is additional to the canFloodOfflineMessages() call, instead of as part of the implementation of canFloodOfflineMessages()?
Simple .diff attached which seems to resolve this issue - when 'flooding' messages to a client which has just become online, only do so if priority > -1