diff options
Diffstat (limited to 'helpers.go')
| -rw-r--r-- | helpers.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -12,8 +12,8 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" ) -func (c *Chats) AddGeminiComment(s string) *Chat { - chat := new(Chat) +func (c *Chats) AddGeminiComment(s string) *ChatEntry { + chat := new(ChatEntry) chat.From = Who_GEMINI chat.Content = s @@ -24,8 +24,8 @@ func (c *Chats) AddGeminiComment(s string) *Chat { return chat } -func (c *Chats) AddUserComment(s string) *Chat { - chat := new(Chat) +func (c *Chats) AddUserComment(s string) *ChatEntry { + chat := new(ChatEntry) chat.From = Who_USER chat.Content = s @@ -172,12 +172,12 @@ func (c *Chat) VerifyUuid() bool { return false } -func (x *Chats) AppendNew(y *Chat) { +func (x *Chats) AppendNew(y *ChatEntry) { x.Lock() defer x.Unlock() var chat *Chat - chat = proto.Clone(y).(*Chat) + chat = proto.Clone(y).(*ChatEntry) x.Chats = append(x.Chats, chat) } |
