From d468e087e5a76b53335a01289acbb32448cc9e04 Mon Sep 17 00:00:00 2001 From: Jesse Peterson Date: Mon, 15 May 2023 12:31:20 -0700 Subject: [PATCH] go generate with latest admgencmd --- notifier/cmd_dm.go | 7 +++++-- notifier/enqueue.go | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/notifier/cmd_dm.go b/notifier/cmd_dm.go index 9998057..a54c896 100644 --- a/notifier/cmd_dm.go +++ b/notifier/cmd_dm.go @@ -19,6 +19,9 @@ type DeclarativeManagementCommand struct { } // NewDeclarativeManagementCommand creates a new "DeclarativeManagement" Apple MDM command. -func NewDeclarativeManagementCommand() *DeclarativeManagementCommand { - return &DeclarativeManagementCommand{Command: DeclarativeManagementPayload{RequestType: DeclarativeManagementRequestType}} +func NewDeclarativeManagementCommand(uuid string) *DeclarativeManagementCommand { + return &DeclarativeManagementCommand{ + Command: DeclarativeManagementPayload{RequestType: DeclarativeManagementRequestType}, + CommandUUID: uuid, + } } diff --git a/notifier/enqueue.go b/notifier/enqueue.go index 522a34f..93d4438 100644 --- a/notifier/enqueue.go +++ b/notifier/enqueue.go @@ -57,8 +57,7 @@ func (n *Notifier) sendCommand(ctx context.Context, ids []string) error { } } - c := NewDeclarativeManagementCommand() - c.CommandUUID = uuid.NewString() + c := NewDeclarativeManagementCommand(uuid.NewString()) if len(tokens) > 0 { c.Command.Data = &tokens }