Users don't have permission to view a custom alert


Active member
I'm having an interesting problem with one of my addons that will send a user a custom alert. To send them an alert, I use the following code:

        array('postId' => $postId)
Users will receive the alert (there will be the little red flag that shows they have a new alert), but as soon as they hover over the alerts button, it quickly disappears and nothing shows up.

The interesting thing is that if I edit the user's permissions and allow them to see deleted content/threads, the alert will show up for them, even if they previously were not able to see it.