We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edbcf72 commit 182b6e8Copy full SHA for 182b6e8
internal/websocket/hub/session.go
@@ -5,6 +5,7 @@ import (
5
6
gsw "github.com/gorilla/websocket"
7
"github.com/joinimpact/api/internal/websocket"
8
+ "github.com/joinimpact/api/pkg/scopes"
9
)
10
11
// SessionID is an int64 ID reference to one session/user
@@ -29,8 +30,10 @@ func (s *Session) SendMessage(message websocket.Message) error {
29
30
message.SequenceNumber = s.SequenceNumber
31
s.SequenceNumber++
32
33
+ marshaled := scopes.Marshal(scopes.ScopeAuthenticated, message)
34
+
35
// Push the message to the channel
- s.Channel <- message
36
+ s.Channel <- marshaled
37
return nil
38
}
39
server
16.7 KB
0 commit comments