mirror of
https://github.com/Xevion/go-ha.git
synced 2025-12-05 23:15:07 -06:00
refactor: websockets into 'connect' module, rename & adjust generally
This commit is contained in:
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/golang-module/carbon"
|
||||
|
||||
"github.com/Xevion/go-ha/internal"
|
||||
ws "github.com/Xevion/go-ha/internal/websocket"
|
||||
ws "github.com/Xevion/go-ha/internal/connect"
|
||||
"github.com/Xevion/go-ha/types"
|
||||
)
|
||||
|
||||
@@ -141,7 +141,7 @@ type BaseEventMsg struct {
|
||||
}
|
||||
|
||||
/* Functions */
|
||||
func callEventListeners(app *App, msg ws.ChanMsg) {
|
||||
func callEventListeners(app *App, msg ws.ChannelMessage) {
|
||||
baseEventMsg := BaseEventMsg{}
|
||||
_ = json.Unmarshal(msg.Raw, &baseEventMsg)
|
||||
listeners, ok := app.eventListeners[baseEventMsg.Event.EventType]
|
||||
|
||||
Reference in New Issue
Block a user