fix: emails sending despite online status

Closes #140
This commit is contained in:
talksik
2026-04-09 16:30:07 -07:00
parent 66aec4478f
commit 762c0ccf6e
7 changed files with 432 additions and 123 deletions
+7
View File
@@ -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
}