Skip to content

fix(notification): ignore blank browser push keys#10885

Merged
ArtyomSavchenko merged 1 commit into
hcengineering:developfrom
ignatremizov:fix/notification-blank-push-key
May 26, 2026
Merged

fix(notification): ignore blank browser push keys#10885
ArtyomSavchenko merged 1 commit into
hcengineering:developfrom
ignatremizov:fix/notification-blank-push-key

Conversation

@ignatremizov

@ignatremizov ignatremizov commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat an unset or blank browser push public key as disabled browser push support.
  • Reuse a normalized push-key accessor in both browser push availability checks and push subscription setup.
  • Preserve existing behavior when a valid VAPID public key is configured.

Testing

  • git diff --check
  • git diff --check upstream/develop..HEAD
  • node common/scripts/install-run-rush.js build --to @hcengineering/notification-resources

Notes

  • Browser push remains disabled when the configured public key is missing or whitespace-only.
  • Desktop-client push guards from upstream were preserved while porting the change.

Treat an unset front-service PUSH_PUBLIC_KEY as disabled browser push support instead of passing an empty string into PushManager.subscribe.

Changes:
- Add a small push public key accessor that normalizes undefined and blank metadata to undefined.
- Use that accessor for both push availability checks and push subscription setup.
- Preserve existing behavior when a real VAPID public key is configured.

Behavioral effect:
Instances without web push configured no longer attempt service worker push subscription with an invalid empty ECDSA key, while keeping browser push disabled until VAPID keys and the notification service are configured.

Signed-off-by: Ignat Remizov <ignat@ignatremizov.com>
@huly-github-staging

Copy link
Copy Markdown

Connected to Huly®: UBERF-16475

@ArtyomSavchenko
ArtyomSavchenko merged commit a677899 into hcengineering:develop May 26, 2026
11 of 13 checks passed
MichaelUray pushed a commit to MichaelUray/huly-platform that referenced this pull request Jul 9, 2026
Treat an unset front-service PUSH_PUBLIC_KEY as disabled browser push support instead of passing an empty string into PushManager.subscribe.

Changes:
- Add a small push public key accessor that normalizes undefined and blank metadata to undefined.
- Use that accessor for both push availability checks and push subscription setup.
- Preserve existing behavior when a real VAPID public key is configured.

Behavioral effect:
Instances without web push configured no longer attempt service worker push subscription with an invalid empty ECDSA key, while keeping browser push disabled until VAPID keys and the notification service are configured.

Signed-off-by: Ignat Remizov <ignat@ignatremizov.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants