summaryrefslogtreecommitdiff
path: root/helpers.go
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.go')
-rw-r--r--helpers.go28
1 files changed, 6 insertions, 22 deletions
diff --git a/helpers.go b/helpers.go
index e24aee3..5c8a630 100644
--- a/helpers.go
+++ b/helpers.go
@@ -3,36 +3,20 @@ package chatpb
import (
"fmt"
"os"
- "path/filepath"
- "time"
"github.com/google/uuid"
"go.wit.com/log"
"google.golang.org/protobuf/proto"
- timestamppb "google.golang.org/protobuf/types/known/timestamppb"
)
func (c *Chats) AddGeminiComment(s string) *ChatEntry {
- chat := new(ChatEntry)
-
- chat.From = Who_GEMINI
- chat.Content = s
- chat.Ctime = timestamppb.New(time.Now())
-
- c.AppendNew(chat)
-
- return chat
+ log.Info("FIX")
+ return nil
}
func (c *Chats) AddUserComment(s string) *ChatEntry {
- chat := new(ChatEntry)
-
- chat.From = Who_USER
- chat.Content = s
-
- c.AppendNew(chat)
-
- return chat
+ log.Info("FIX")
+ return nil
}
func UnmarshalChats(data []byte) (*Chats, error) {
@@ -100,12 +84,12 @@ func (c *Chat) VerifyUuid() bool {
return false
}
-func (x *Chats) AppendNew(y *ChatEntry) {
+func (x *Chats) AppendNew(y *Chat) {
x.Lock()
defer x.Unlock()
var chat *Chat
- chat = proto.Clone(y).(*ChatEntry)
+ chat = proto.Clone(y).(*Chat)
x.Chats = append(x.Chats, chat)
}