Change msg key to be date-based rather than consecutive integer

This commit is contained in:
Dan Willhite
2017-08-25 17:20:04 -07:00
committed by Dan Willhite
parent 996741a669
commit c24e10646f

View File

@@ -38,7 +38,7 @@ type Message struct {
}
func (m Message) ID() string {
return fmt.Sprintf("%016x/%s", m.Ordinal, m.Author)
return fmt.Sprintf("%020x/%s", m.ClientTime.UnixNano(), m.Author)
}
func AddMessage(body string, author string, clientTime time.Time, ds datas.Dataset) (datas.Dataset, error) {