Logic update for message history