Use endpoint for chat history instead of websocket (#67)

* Change placeholder when chat is disabled

* Use the /chat endpoint for bulk chat history population instead of websocket. For #47

* Force LiveUI/seek bar during live to show. Closes #11.

* Change pulling chat history into app.js

* Force new messages to have visability = true
This commit is contained in:
Gabe Kangas
2020-07-18 17:27:04 -07:00
committed by GitHub
parent a266633a9a
commit 2855027f22
4 changed files with 28 additions and 13 deletions

View File

@@ -56,12 +56,6 @@ func (s *server) err(err error) {
s.errCh <- err
}
func (s *server) sendPastMessages(c *Client) {
for _, msg := range s.Messages {
c.Write(msg)
}
}
func (s *server) sendAll(msg models.ChatMessage) {
for _, c := range s.Clients {
c.Write(msg)
@@ -104,7 +98,6 @@ func (s *server) Listen() {
s.Clients[c.id] = c
s.listener.ClientAdded(c.id)
s.sendPastMessages(c)
// remove a client
case c := <-s.delCh: