@@ -38,6 +38,13 @@ func (a *Authorizer) Authorize(ctx context.Context, channelID, humanID string) e
|
||||
return a.authorizeNetwork(ctx, rest, humanID)
|
||||
case "stream":
|
||||
return a.authorizeStream(ctx, rest, humanID)
|
||||
case "_presence":
|
||||
// Always allowed — used for global online presence tracking.
|
||||
// The channel ID is _presence:{humanId}, so verify the humanId matches.
|
||||
if rest != humanID {
|
||||
return ErrUnauthorized
|
||||
}
|
||||
return nil
|
||||
default:
|
||||
return ErrUnauthorized
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user