summaryrefslogtreecommitdiff
path: root/doNewChat.go
blob: adb0ee36147d1914f20e29bcb954f6cb64e3e859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package main

import (
	"go.wit.com/lib/protobuf/chatpb"
	"go.wit.com/log"
	"google.golang.org/protobuf/types/known/timestamppb"
)

func doNewChat() {
	chat := &chatpb.Chat{
		Uuid:     argv.Uuid,
		ChatName: "todo: set this",
		Ctime:    timestamppb.Now(),
	}

	me.chats.Chats = append(me.chats.Chats, chat)
	me.chats.ConfigSave()
	log.Info("created new chat for", argv.Uuid)
}