yjp 5 bulan lalu
induk
melakukan
343fddd23d
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      websocket/websocket.go

+ 2 - 2
websocket/websocket.go

@@ -128,8 +128,8 @@ func (m *Manager) BroadCast(groupID string, msg []byte) error {
 
 type ConnectionOption func(sessionMap map[string]any)
 
-func WithConnectionContext(key string, context any) ConnectionOption {
+func WithConnectionContext(context any) ConnectionOption {
 	return func(sessionMap map[string]any) {
-		sessionMap[connectionContextKey+"::"+key] = context
+		sessionMap[connectionContextKey] = context
 	}
 }