From a26bc83d80d8701d99a51aa78f00d0916cdd6451 Mon Sep 17 00:00:00 2001 From: Shchedrin Andrei Date: Fri, 15 Jul 2022 13:25:31 +0300 Subject: [PATCH 1/2] =?UTF-8?q?ref=20#83597=20=D0=A0=D0=B5=D1=84=D0=B0?= =?UTF-8?q?=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D0=BD=D0=B3=20=D1=81=D0=B8=D1=81?= =?UTF-8?q?=D1=82=D0=B5=D0=BC=D1=8B=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA=D0=B0?= =?UTF-8?q?=20=D0=BC=D0=B5=D0=BD=D0=B5=D0=B4=D0=B6=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v1/types.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v1/types.go b/v1/types.go index b38e80a..d14800a 100644 --- a/v1/types.go +++ b/v1/types.go @@ -722,8 +722,8 @@ type ( } WsEventUserOnlineUpdatedData struct { - User *UserRef `json:"user"` - Online bool `json:"online"` + User *UsersResponseItem `json:"user"` + Online bool `json:"online"` } WsEventChatsDeletedData struct { From f2c8b2ce837e78ccfdc1b1d9726e6b2e9526b4e6 Mon Sep 17 00:00:00 2001 From: Shchedrin Andrei Date: Wed, 20 Jul 2022 16:45:38 +0300 Subject: [PATCH 2/2] add external id to user ref --- v1/types.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/v1/types.go b/v1/types.go index d14800a..1935b5b 100644 --- a/v1/types.go +++ b/v1/types.go @@ -511,16 +511,17 @@ type ( } UserRef struct { - ID uint64 `json:"id"` - Avatar string `json:"avatar"` - Type string `json:"type"` - Name string `json:"name"` - FirstName string `json:"first_name,omitempty"` - LastName string `json:"last_name,omitempty"` - Phone string `json:"phone,omitempty"` - Email string `json:"email,omitempty"` - IsAdmin bool `json:"is_admin"` - Available bool `json:"available"` + ID uint64 `json:"id"` + ExternalID uint64 `json:"external_id"` + Avatar string `json:"avatar"` + Type string `json:"type"` + Name string `json:"name"` + FirstName string `json:"first_name,omitempty"` + LastName string `json:"last_name,omitempty"` + Phone string `json:"phone,omitempty"` + Email string `json:"email,omitempty"` + IsAdmin bool `json:"is_admin"` + Available bool `json:"available"` } Channel struct { @@ -722,8 +723,8 @@ type ( } WsEventUserOnlineUpdatedData struct { - User *UsersResponseItem `json:"user"` - Online bool `json:"online"` + User *UserRef `json:"user"` + Online bool `json:"online"` } WsEventChatsDeletedData struct {