Report Alerts [Deleted]

@markku I thought about it from a different angle and worked it out. I just check the alerts directly. So, now it should do what you want.

Thanks for the suggestion!
 
@Jeremy P I implemented a similar solution in a private addon (which does a bunch of other reports tweaks); you really don't want to fetch all alerts for a user.

I use something like this before even checking if the user can view the report:
Code:
$hasUnviewedReport = $db->fetchRow("select alert_id from xf_user_alert
  where alerted_user_id = ? and content_type = ? and content_id = ? and view_date = 0 and action = ?",
  array($ReportComment['user_id'], 'report', $this->get('report_id'),'comment')
  );

if (!empty($hasUnviewedReport))
{
  continue;
}
 
  • Like
Reactions: rdn
You're right. It hasn't been troublesome for me so far, but I could certainly see how it wouldn't scale well when you have half a dozen moderators commenting with hundreds of alerts each.

I was trying to avoid extending a new model, but I will take that approach now.
 
  • Like
Reactions: Xon
Jeremy P updated Report Alerts with a new update entry:

Expand alert capabilities

You must uninstall the previous version before installing the new version!
  1. Uninstall the add-on from your Admin Control Panel
  2. Delete the Jrahmy/ReportCommentAlert folder from your library folder
This release expands the add-on to alert all pertinent moderators when a report is created, as well as include status changes in follow-up alerts.

Thus, the add-on has been renamed to just 'Report Alerts'.

Please let me know if there are any questions or...

Read the rest of this update entry...
 
@The Sandman Oops, forgot to repackage after bumping the version number in the XML. :\

The only changes between 2.2.1 (which wasn't released here) and 2.2.2 were in PHP, so version number aside it shouldn't cause any trouble.
 
Top Bottom