X-Git-Url: http://git.scottworley.com/reliable-chat/blobdiff_plain/86945f8d2e10192da9f9ad7f5678f382d83b55fd..b199796a3d2c82a84243e3a5ad3099315d8f1b55:/server/server.go?ds=sidebyside diff --git a/server/server.go b/server/server.go index 5837032..8ce9678 100644 --- a/server/server.go +++ b/server/server.go @@ -18,6 +18,7 @@ var fetch_wake_count = expvar.NewInt("fetch_wake_count") type Message struct { Time time.Time + ID string Text string } @@ -121,7 +122,10 @@ func start_server(store Store) { }) http.HandleFunc("/speak", func(w http.ResponseWriter, r *http.Request) { - store.Add <- &Message{time.Now(), r.FormValue("text")} + store.Add <- &Message{ + time.Now(), + r.FormValue("id"), + r.FormValue("text")} }) log.Fatal(http.ListenAndServe(":"+strconv.Itoa(*port), nil))