marking messages as read when they are viewed in chat