Stop showing guests on WOL Context x.x

This commit is contained in:
Azareal 2019-05-04 07:49:21 +10:00
parent d321c40290
commit 634b03936c
1 changed files with 6 additions and 0 deletions

View File

@ -135,6 +135,9 @@ func wsPageResponses(wsUser *WSUser, conn *websocket.Conn, page string) {
// TODO: Evict from page when permissions change? Or check user perms every-time before sending data? // TODO: Evict from page when permissions change? Or check user perms every-time before sending data?
case strings.HasPrefix(page, "/topic/"): case strings.HasPrefix(page, "/topic/"):
//fmt.Println("entering topic prefix websockets zone") //fmt.Println("entering topic prefix websockets zone")
if wsUser.User.ID == 0 {
return
}
_, tid, err := ParseSEOURL(page) _, tid, err := ParseSEOURL(page)
if err != nil { if err != nil {
return return
@ -210,6 +213,9 @@ func wsLeavePage(wsUser *WSUser, conn *websocket.Conn, page string) {
}) })
case strings.HasPrefix(page, "/topic/"): case strings.HasPrefix(page, "/topic/"):
//fmt.Println("leaving topic prefix websockets zone") //fmt.Println("leaving topic prefix websockets zone")
if wsUser.User.ID == 0 {
return
}
wsUser.FinalizePage(page, func() { wsUser.FinalizePage(page, func() {
_, tid, err := ParseSEOURL(page) _, tid, err := ParseSEOURL(page)
if err != nil { if err != nil {