diff --git a/dumpchat.go b/dumpchat.go index e40a6f7..dbaa3ee 100644 --- a/dumpchat.go +++ b/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) } }