From c6af96b2f00b1334440bd0df268de4cc55dabe25 Mon Sep 17 00:00:00 2001 From: Ben Hoyt Date: Thu, 28 Mar 2024 17:26:18 +1300 Subject: [PATCH] feat(client): add change-update notice type (#401) Just the addition of the constant. This was missed earlier when adding the change-update notice. --- client/notices.go | 4 ++++ client/notices_test.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/notices.go b/client/notices.go index 651ae4e9..7fdbb4af 100644 --- a/client/notices.go +++ b/client/notices.go @@ -122,6 +122,10 @@ type Notice struct { type NoticeType string const ( + // Recorded whenever a change is updated: when it is first spawned or its + // status was updated. The key for change-update notices is the change ID. + ChangeUpdateNotice NoticeType = "change-update" + // A custom notice reported via the Pebble client API or "pebble notify". // The key and data fields are provided by the user. The key must be in // the format "mydomain.io/mykey" to ensure well-namespaced notice keys. diff --git a/client/notices_test.go b/client/notices_test.go index e2a8d3fe..8a2ed3b2 100644 --- a/client/notices_test.go +++ b/client/notices_test.go @@ -28,7 +28,7 @@ import ( func (cs *clientSuite) TestNotice(c *C) { cs.rsp = `{"type": "sync", "result": { - "id": "123", + "id": "123", "user-id": 1000, "type": "custom", "key": "a.b/c",