eod commit
This commit is contained in:
@@ -2,6 +2,7 @@ package ws
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"homestead/homestead_gateway/util/cache"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@@ -46,7 +47,7 @@ func (wsg *WebsocketGateway) handlePush(w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
meta := connectionMetaData{connectionType: handshake.Type}
|
||||
meta := cache.ConnectionMetaData{ConnectionType: handshake.Type}
|
||||
|
||||
switch handshake.Type {
|
||||
case "mod":
|
||||
@@ -58,7 +59,7 @@ func (wsg *WebsocketGateway) handlePush(w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
meta.id = mhs.ServerID
|
||||
meta.ID = mhs.ServerID
|
||||
|
||||
if err = wsg.sendWebsocketResponse(conn, GatewayAck{Status: "connected", Type: "mod"}); err != nil {
|
||||
return
|
||||
@@ -78,7 +79,7 @@ func (wsg *WebsocketGateway) handlePush(w http.ResponseWriter, r *http.Request)
|
||||
return
|
||||
}
|
||||
|
||||
meta.id = bhs.BotID
|
||||
meta.ID = bhs.BotID
|
||||
|
||||
if err = wsg.sendWebsocketResponse(conn, GatewayAck{Status: "connected", Type: "bot"}); err != nil {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user