From cdff165eda9124bba47546bd95dc88046607b247 Mon Sep 17 00:00:00 2001 From: Oleg <11861208+Catzilla@users.noreply.github.com> Date: Tue, 20 Aug 2024 23:08:24 +0300 Subject: [PATCH] Fixed SubscriberMarkMessageSeenOptions --- lib/model.go | 17 ++++++++++------- lib/subscribers_test.go | 6 ++++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lib/model.go b/lib/model.go index cf0f22f..f8dd530 100644 --- a/lib/model.go +++ b/lib/model.go @@ -239,10 +239,14 @@ type SubscriberUnseenCountOptions struct { Seen *bool `json:"seen"` } +type SubscriberMarkMessageSeenMark struct { + Seen bool `json:"seen"` + Read bool `json:"read"` +} + type SubscriberMarkMessageSeenOptions struct { - MessageID string `json:"messageId"` - Seen bool `json:"seen"` - Read bool `json:"read"` + MessageID string `json:"messageId"` + Mark SubscriberMarkMessageSeenMark `json:"mark"` } type NotificationFeedData struct { @@ -546,9 +550,8 @@ type ChangesApplyResponse struct { Data []ChangesGetResponseData `json:"data,omitempty"` } - type UpdateTenantRequest struct { - Name string `json:"name"` - Data map[string]interface{} `json:"data"` - Identifier string `json:"identifier"` + Name string `json:"name"` + Data map[string]interface{} `json:"data"` + Identifier string `json:"identifier"` } diff --git a/lib/subscribers_test.go b/lib/subscribers_test.go index 0836350..74206cc 100644 --- a/lib/subscribers_test.go +++ b/lib/subscribers_test.go @@ -388,8 +388,10 @@ func TestSubscriberService_MarkMessageSeen(t *testing.T) { opts := lib.SubscriberMarkMessageSeenOptions{ MessageID: "message_id", - Seen: true, - Read: true, + Mark: lib.SubscriberMarkMessageSeenMark{ + Seen: true, + Read: true, + }, } httpServer := createTestServer(t, TestServerOptions[lib.SubscriberMarkMessageSeenOptions, *lib.SubscriberNotificationFeedResponse]{