One small issue though - there's a conflict between this one and DP's Enhanced Search - you've both the getReportsByIds() method for user_ids and it's causing a pair of server errors whenever anyone reports a post. Any chance you could rename your method?
OK, I ran some tests. What seems to be happening is that the last report pops up again when somebody comments on a report. How could that be? And what could go wrong?
Not sure if it's intentional, but if I've made a comment in a report, then am away for a day and during that time 5 other staff members comment in the same report, I will have received a total of 5 alerts regarding the same report's comments.
Would be better to only receive only one (and once you've read the report, it would again give you a max of 1 alert before reading it again).
It's intentional. XF offers no read-marking for reports like they do for threads, so what you are asking significantly increases the complexity of the add-on. I'd have to create a new database table and extend the entire report system to do read-marking.
This add-on is simple and I'm not interested in making it any more complex. It's open-source under the MIT license if someone wants to add to it.