Repository navigation
Ask before a server can wake the phone, and send it the mutes (GRYT-1689) - #308
Merged
Merged
Conversation
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
mutedlist, including channels the server itself defaults to Nothing. It's re-sent whenever a mute changes.Checked on the simulator against Gryt-chat/server#284 and a local relay:
["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-nativeone now, like Push to talk.tsc is clean, 1,414 tests pass, and expo-doctor passes 20 of 20.
🤖 Generated with Claude Code