Flarum sets the state of unread through a table discussion_user. You could create a listener to listen to Post Posted and update all entries for all users to the last post id. Alternatively one can update the api response for a discussion to modify the last post read state of the actor to be always the last. I think that last option would be easiest..
Not able to provide snippets right now.