gosora/no_websockets.go
Azareal 166d96e3b2 You can now dismiss alerts.
Refactored the API system.
Fixed a bug in the default topic where the forum didn't have a time set.
The JS is now run in strict mode.
Fixed a bug in the titles where they broke onto multiple lines.
Fixed a bug in create topic where the datetime wasn't getting set for the forum.
Fixed a bug in create reply where the local cache wasn't getting updated.
Fixed a bug in create reply where the wrong forum was getting updated.

Phased out jQuery in a few bits of JS to make it easier to understand.
2017-08-18 13:16:56 +01:00

41 lines
736 B
Go

// +build no_ws
package main
import "errors"
import "net/http"
var ws_hub WS_Hub
var ws_nouser error = errors.New("This user isn't connected via WebSockets")
type WS_Hub struct
{
}
func (_ *WS_Hub) guest_count() int {
return 0
}
func (_ *WS_Hub) user_count() int {
return 0
}
func (hub *WS_Hub) broadcast_message(_ string) error {
return nil
}
func (hub *WS_Hub) push_message(_ int, _ string) error {
return ws_nouser
}
func(hub *WS_Hub) push_alert(_ int, _ int, _ string, _ string, _ int, _ int, _ int) error {
return ws_nouser
}
func(hub *WS_Hub) push_alerts(_ []int, _ int, _ string, _ string, _ int, _ int, _ int) error {
return ws_nouser
}
func route_websockets(_ http.ResponseWriter, _ *http.Request, _ User) {
}