feat: dump last chat entry
This commit is contained in:
parent
710693b18a
commit
eba85c6b97
10
dumpchat.go
10
dumpchat.go
|
@ -5,8 +5,14 @@ import (
|
|||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
func dumpEntry(entry *chatpb.ChatEntry) {
|
||||
log.Printf(entry.FormatTEXT())
|
||||
}
|
||||
|
||||
func dumpchat(chat *chatpb.Chat) {
|
||||
for _, entry := range chat.GetEntries() {
|
||||
log.Printf("Entry: %s\n", entry.GetUuid())
|
||||
entries := chat.GetEntries()
|
||||
if len(entries) > 0 {
|
||||
lastEntry := entries[len(entries)-1]
|
||||
dumpEntry(lastEntry)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue