XF 2.2 Addon alerts automatically marked as read

mjda

Well-known member
I noticed that alerts sent from my addon are automatically marked as read when user's view the alerts list, even if they don't view the content. Is there any way to prevent this from happening? I'd rather it only mark as read if they view the content, or click the "Mark read" button.
 
Solution
For an example, see XF\PreRegAction\Thread\Create::sendSuccessAlert.

Specifically note the ['autoRead' => false] option when creating the alert. All alert methods support that. (Only compatible with XF 2.2)
For an example, see XF\PreRegAction\Thread\Create::sendSuccessAlert.

Specifically note the ['autoRead' => false] option when creating the alert. All alert methods support that. (Only compatible with XF 2.2)
 
Solution
Back
Top Bottom