Add generated id to messages