@@ -39,7 +39,7 @@ type ListChatsResponse struct {
39
39
core.CommonResponse
40
40
41
41
// Chats data
42
- Chats []ListChatsChat `json:"chats"`
42
+ Chats []ListChatsChatData `json:"chats"`
43
43
44
44
// Total number of chats
45
45
TotalChatsCount int64 `json:"total_chats_count"`
@@ -48,20 +48,6 @@ type ListChatsResponse struct {
48
48
TotalUnreadCount int64 `json:"total_unread_count"`
49
49
}
50
50
51
- type ListChatsChat struct {
52
- // Chat data
53
- Chat ListChatsChatData `json:"chat"`
54
-
55
- // Identifier of the first unread chat message
56
- FirstUnreadMessageId uint64 `json:"first_unread_message_id"`
57
-
58
- // Identifier of the last message in the chat
59
- LastMessageId uint64 `json:"last_message_id"`
60
-
61
- // Number of unread messages in the chat
62
- UnreadCount int64 `json:"unread_count"`
63
- }
64
-
65
51
type ListChatsChatData struct {
66
52
// Chat identifier
67
53
ChatId string `json:"chat_id"`
@@ -79,6 +65,15 @@ type ListChatsChatData struct {
79
65
80
66
// Chat creation date
81
67
CreatedAt time.Time `json:"created_at"`
68
+
69
+ // Identifier of the first unread chat message
70
+ FirstUnreadMessageId uint64 `json:"first_unread_message_id"`
71
+
72
+ // Identifier of the last message in the chat
73
+ LastMessageId uint64 `json:"last_message_id"`
74
+
75
+ // Number of unread messages in the chat
76
+ UnreadCount int64 `json:"unread_count"`
82
77
}
83
78
84
79
// Returns information about chats by specified filters
0 commit comments