Skip to content

Ask before a server can wake the phone, and send it the mutes (GRYT-1689) - #308

Merged
sivert-io merged 1 commit into
mainfrom
claude/GRYT-1689-push-optin
Oct 7, 2026
Merged

sivert-io merged 1 commit into
mainfrom
claude/GRYT-1689-push-optin

Conversation

@sivert-io

@sivert-io sivert-io commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Ask before a server can wake the phone, and send it the mutes (GRYT-1689)

Push becomes opt-in for each server. A server nobody said yes to never reaches the push relay, so it costs the relay nothing.

  • The first time you open a server, it asks "Notifications from ?" with Turn on and Not now. Only the server on screen asks, so joining five servers doesn't bring up five dialogs. The OS permission prompt only appears after the first Turn on.
  • Notifications settings gets a "When the app is closed" section with a switch for each server. Off takes the capability back from the server and the relay.
  • A server or everything set to Nothing takes it back too. So does notifications being switched off in iOS or Android settings, which is checked every time the app comes back to the front.
  • Every channel and DM at Nothing goes to the server as a muted list, including channels the server itself defaults to Nothing. It's re-sent whenever a mute changes.
  • Leaving a server drops its capability at the relay and forgets the answer, so joining again asks again.
  • The phone swaps its capability for a fresh one every 30 days. The relay forgets one after 120 idle days, and before this a server could have held a dead one forever.

Checked on the simulator against Gryt-chat/server#284 and a local relay:

  • The prompt shows only on the server on screen.
  • Not now removed the registration left over from before, on both the relay and the server, and a mention then made no request to the relay.
  • Switching it on registered with both.
  • Nothing for the server removed both rows, and Default brought them back.
  • Muting General sent ["general"]. A mention there made no relay request, and one in Random made one.

Not tried on a device: leaving a server, and turning notifications off in iOS settings. Both are covered by the code path and unit tests only.

The first switch I used, React Native's own Switch, didn't react to taps in the simulator. It's the @gryt/ui-native one now, like Push to talk.

tsc is clean, 1,414 tests pass, and expo-doctor passes 20 of 20.

🤖 Generated with Claude Code

…689)

Push becomes opt-in for each server. A server nobody said yes to never reaches the push relay, so it costs the relay nothing.

- The first time you open a server, it asks "Notifications from <server>?" with **Turn on** and **Not now**. Only the server on screen asks, so joining five servers doesn't bring up five dialogs. The OS permission prompt only appears after the first **Turn on**.
- Notifications settings gets a "When the app is closed" section with a switch for each server. Off takes the capability back from the server and the relay.
- A server or everything set to **Nothing** takes it back too. So does notifications being switched off in iOS or Android settings, which is checked every time the app comes back to the front.
- Every channel and DM at **Nothing** goes to the server as a `muted` list, including channels the server itself defaults to Nothing. It's re-sent whenever a mute changes.
- Leaving a server drops its capability at the relay and forgets the answer, so joining again asks again.
- The phone swaps its capability for a fresh one every 30 days. The relay forgets one after 120 idle days, and before this a server could have held a dead one forever.

Checked on the simulator against the server branch and a local relay:

- The prompt shows only on the server on screen.
- **Not now** removed the registration left over from before, on both the relay and the server, and a mention then made no request to the relay.
- Switching it on registered with both.
- **Nothing** for the server removed both rows, and Default brought them back.
- Muting General sent `["general"]`. A mention there made no relay request, and one in Random made one.

Not tried on a device: leaving a server, and turning notifications off in iOS settings. Both are covered by the code path and unit tests only.

The first switch I used, React Native's own `Switch`, didn't react to taps in the simulator. It's the `@gryt/ui-native` one now, like Push to talk.

tsc is clean, 1,414 tests pass, and expo-doctor passes 20 of 20.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@sivert-io
sivert-io merged commit 5126597 into main Oct 7, 2026
5 checks passed
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.

1 participant