@@ -13,10 +13,10 @@ var _ BotChatData = (*ChatBaseData)(nil)
13
13
type ChatBaseData struct {
14
14
changed bool // if true needs to be saved
15
15
16
- ChatKey // BotID & ChatID
16
+ // ChatKey // BotID & ChatID
17
17
18
- // BotUserID is and ID of a bot user who owns this chat
19
- BotUserID string // We want it to be indexed and not to omit empty, so we can find chats without bot user assigned .
18
+ // BotUserID is an ID of a bot user who owns this chat
19
+ BotUserID string // We want it to be indexed and not to omitempty, to find chats without an assigned bot user.
20
20
21
21
// BotUserIDs keeps ids of bot users who are members of a group chat
22
22
BotUserIDs []string `dalgo:",omitempty" datastore:",omitempty" firestore:",omitempty"`
@@ -27,7 +27,7 @@ type ChatBaseData struct {
27
27
28
28
// AppUserIntIDs is kept for legacy reasons
29
29
// Deprecated: replace with `AppUserIDs []string`
30
- AppUserIntIDs []int64 `dalgo:",omitempty" datastore:",omitempty" firestore:",omitempty"`
30
+ // AppUserIntIDs []int64 `dalgo:",omitempty" datastore:",omitempty" firestore:",omitempty"`
31
31
32
32
// IsGroup indicates if bot is added/used in a group chat
33
33
IsGroup bool `dalgo:",noindex,omitempty" datastore:",noindex,omitempty" firestore:",omitempty"`
@@ -59,9 +59,9 @@ type ChatBaseData struct {
59
59
}
60
60
61
61
func (e * ChatBaseData ) Validate () error {
62
- if err := e .ChatKey .Validate (); err != nil {
63
- return err
64
- }
62
+ // if err := e.ChatKey.Validate(); err != nil {
63
+ // return err
64
+ // }
65
65
if strings .TrimSpace (e .BotUserID ) == "" {
66
66
return validation .NewErrBadRecordFieldValue ("BotUserID" , "is empty" )
67
67
}
@@ -78,19 +78,19 @@ func (e *ChatBaseData) Base() *ChatBaseData {
78
78
return e
79
79
}
80
80
81
- // Indicates that chat data has been changed and record needs to be saved
81
+ // IsChanged indicates that chat data has been changed and record needs to be saved
82
82
func (e * ChatBaseData ) IsChanged () bool {
83
83
return e .changed || e .chatState .changed
84
84
}
85
85
86
- func (e * ChatBaseData ) Key () ChatKey {
87
- return NewChatKey (e .BotID , e .ChatID )
88
- }
86
+ // func (e *ChatBaseData) Key() ChatKey {
87
+ // return NewChatKey(e.BotID, e.ChatID)
88
+ // }
89
89
90
90
// GetBotID returns bot ID
91
- func (e * ChatBaseData ) GetBotID () string {
92
- return e .BotID
93
- }
91
+ // func (e *ChatBaseData) GetBotID() string {
92
+ // return e.BotID
93
+ // }
94
94
95
95
//// SetBotID sets bot ID - TODO: consider removing?
96
96
//func (e *ChatBaseData) SetBotID(botID string) {
@@ -99,9 +99,9 @@ func (e *ChatBaseData) GetBotID() string {
99
99
//}
100
100
101
101
// GetChatID returns chat ID
102
- func (e * ChatBaseData ) GetChatID () string {
103
- return e .ChatID
104
- }
102
+ // func (e *ChatBaseData) GetChatID() string {
103
+ // return e.ChatID
104
+ // }
105
105
106
106
//// SetChatID sets chat ID
107
107
//func (e *ChatBaseData) SetChatID(chatID string) {
0 commit comments