This commit is contained in:
Bel LaPointe
2024-04-16 06:53:30 -06:00
parent 8ae8f47753
commit f38c183fe8
4 changed files with 20 additions and 0 deletions

View File

@@ -28,6 +28,10 @@ func NewEvent(ID, URL string, TS uint64, Name, Asset, Datacenter, Team string, R
}
}
func (e Event) Empty() bool {
return e == (Event{})
}
func updated() uint64 {
return uint64(time.Now().UnixNano() / int64(time.Millisecond))
}

View File

@@ -22,3 +22,7 @@ func NewMessage(ID, URL string, TS uint64, Author, Plaintext string, ThreadID st
ThreadID: ThreadID,
}
}
func (m Message) Empty() bool {
return m == (Message{})
}

View File

@@ -20,3 +20,7 @@ func NewThread(ID, URL string, TS uint64, Channel string, EventID string) Thread
EventID: EventID,
}
}
func (t Thread) Empty() bool {
return t == (Thread{})
}