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 220.127.116.11.1. Message
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
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()?
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()
Tested with 3.10 and it was still an issue.
XEP-0160 also forbids this behavior.