Show notification if server is updated

This commit is contained in:
Deluan
2021-06-21 13:42:14 -04:00
parent 47bcf719f2
commit 877f01bd38
5 changed files with 19 additions and 11 deletions
+1
View File
@@ -40,6 +40,7 @@ type KeepAlive struct {
type ServerStart struct {
baseEvent
StartTime time.Time `json:"startTime"`
Version string `json:"version"`
}
const Any = "*"
+1 -1
View File
@@ -208,7 +208,7 @@ func (b *broker) listen() {
log.Debug("Client added to event broker", "numClients", len(clients), "newClient", c.String())
// Send a serverStart event to new client
c.diode.put(b.prepareMessage(&ServerStart{StartTime: consts.ServerStart}))
c.diode.put(b.prepareMessage(&ServerStart{StartTime: consts.ServerStart, Version: consts.Version()}))
case c := <-b.unsubscribing:
// A client has detached and we want to