V0.7.0 shell contract (#54)
All checks were successful
All checks were successful
This commit was merged in pull request #54.
This commit is contained in:
@@ -173,6 +173,12 @@ func (h *Hub) IsConnected(userID string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// Broadcast sends an event to all connected clients via the bus.
|
||||
// No TargetUserID — every WS subscriber receives it.
|
||||
func (h *Hub) Broadcast(event Event) {
|
||||
h.bus.Publish(event)
|
||||
}
|
||||
|
||||
// PublishToUser sends an event to a specific user via the bus.
|
||||
// All replicas receive the event; only the one with the user's connection delivers it.
|
||||
func (h *Hub) PublishToUser(userID string, event Event) {
|
||||
|
||||
Reference in New Issue
Block a user