update the message's state