Skip to content

Commit fbf0470

Browse files
feat(api): add description field to chats, make title optional
`title` now fallbacks to `null`, instead of an empty string
1 parent a40a83d commit fbf0470

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 15
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-0763b61997721da6f4514241bf0f7bb5f7a88c7298baf0f1b2d58036aaf7e2f1.yml
3-
openapi_spec_hash: 5158475919c04bb52fb03c6a4582188d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/beeper%2Fbeeper-desktop-api-bea2e5f3b01053a66261a824c75c2640856d0ba00ad795ab71734c4ab9ae33b0.yml
3+
openapi_spec_hash: d766f6e344c12ca6d23e6ef6713b38c4
44
config_hash: 5fa7ded4bfdffe4cc1944a819da87f9f

chat.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,41 +141,44 @@ type Chat struct {
141141
Network string `json:"network,required"`
142142
// Chat participants information.
143143
Participants ChatParticipants `json:"participants,required"`
144-
// Display title of the chat as computed by the client/server.
145-
Title string `json:"title,required"`
146144
// Chat type: 'single' for direct messages, 'group' for group chats.
147145
//
148146
// Any of "single", "group".
149147
Type ChatType `json:"type,required"`
150148
// Number of unread messages.
151149
UnreadCount int64 `json:"unreadCount,required"`
150+
// Description of the chat.
151+
Description string `json:"description,nullable"`
152152
// True if chat is archived.
153153
IsArchived bool `json:"isArchived"`
154-
// True if chat notifications are muted.
154+
// True if the chat is muted.
155155
IsMuted bool `json:"isMuted"`
156-
// True if chat is pinned.
156+
// True if the chat is pinned.
157157
IsPinned bool `json:"isPinned"`
158158
// Timestamp of last activity.
159159
LastActivity time.Time `json:"lastActivity" format:"date-time"`
160160
// Last read message sortKey.
161161
LastReadMessageSortKey string `json:"lastReadMessageSortKey"`
162162
// Local chat ID specific to this Beeper Desktop installation.
163163
LocalChatID string `json:"localChatID,nullable"`
164+
// Display title of the chat.
165+
Title string `json:"title,nullable"`
164166
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
165167
JSON struct {
166168
ID respjson.Field
167169
AccountID respjson.Field
168170
Network respjson.Field
169171
Participants respjson.Field
170-
Title respjson.Field
171172
Type respjson.Field
172173
UnreadCount respjson.Field
174+
Description respjson.Field
173175
IsArchived respjson.Field
174176
IsMuted respjson.Field
175177
IsPinned respjson.Field
176178
LastActivity respjson.Field
177179
LastReadMessageSortKey respjson.Field
178180
LocalChatID respjson.Field
181+
Title respjson.Field
179182
ExtraFields map[string]respjson.Field
180183
raw string
181184
} `json:"-"`

0 commit comments

Comments
 (0)