ing
This commit is contained in:
parent
aac31c8218
commit
83c0e4d252
|
@ -21,10 +21,10 @@ type authSubscriberHandlers struct {
|
|||
ctx context.Context
|
||||
}
|
||||
|
||||
func (h *authSubscriberHandlers) OnSubscribe(payload string) {
|
||||
uid := "kdkdkd"
|
||||
channel := "auth"
|
||||
soc := server.GetSocket(channel, uid)
|
||||
|
||||
soc.Write([]byte(payload))
|
||||
func (h *authSubscriberHandlers) OnSubscribe(channel string, message ofs.SubscribeMessage) {
|
||||
for _, uid := range message.Targets {
|
||||
if soc := server.GetSocket(channel, uid); nil != soc {
|
||||
soc.Write(message.Message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,10 +21,10 @@ type probeSubscriberHandlers struct {
|
|||
ctx context.Context
|
||||
}
|
||||
|
||||
func (h *probeSubscriberHandlers) OnSubscribe(payload string) {
|
||||
uid := "kdkdkd"
|
||||
channel := "auth"
|
||||
soc := server.GetSocket(channel, uid)
|
||||
|
||||
soc.Write([]byte(payload))
|
||||
func (h *probeSubscriberHandlers) OnSubscribe(channel string, message ofs.SubscribeMessage) {
|
||||
for _, uid := range message.Targets {
|
||||
if soc := server.GetSocket(channel, uid); nil != soc {
|
||||
soc.Write(message.Message)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user