Lyphiard
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:
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.
Code:
XenForo_Model_Alert::alert(
$user['user_id'],
$visitor['user_id'],
$visitor['username'],
'post',
$threadId,
'update_new',
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.