Skip to content

ntf-server: add push provider policy#1808

Merged
epoberezkin merged 4 commits into
masterfrom
sh/apns
Jun 17, 2026
Merged

ntf-server: add push provider policy#1808
epoberezkin merged 4 commits into
masterfrom
sh/apns

Conversation

@shumvgolove

Copy link
Copy Markdown
Collaborator

Comment on lines +656 to +658
pushProviderAllowed token >>= \case
True -> action
False -> pure $ NRErr $ CMD SMP.PROHIBITED

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pushProviderAllowed token >>= \case
True -> action
False -> pure $ NRErr $ CMD SMP.PROHIBITED
ifM
(pushProviderAllowed token)
action
(pure $ NRErr $ CMD SMP.PROHIBITED)

Comment on lines +644 to +648
pushProviderAllowed token >>= \case
True -> do
q <- getOrCreatePushWorker s (srvHost_, pp) isOwn
atomically $ writeTBQueue q (tkn, ntf)
False -> liftIO $ logWarn "skipping disabled APNS test push provider"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pushProviderAllowed token >>= \case
True -> do
q <- getOrCreatePushWorker s (srvHost_, pp) isOwn
atomically $ writeTBQueue q (tkn, ntf)
False -> liftIO $ logWarn "skipping disabled APNS test push provider"
ifM
(pushProviderAllowed token)
(getOrCreatePushWorker s (srvHost_, pp) isOwn >>= atomically . (`writeTBQueue` (tkn, ntf))
(logWarn "skipping disabled APNS test push provider")

@epoberezkin epoberezkin merged commit db3e98f into master Jun 17, 2026
4 of 6 checks passed
@epoberezkin epoberezkin deleted the sh/apns branch June 17, 2026 08:14
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.

3 participants