Repository navigation
feat: turn Remotes on and off and change their settings from the API - #649
Merged
xHeaven merged 3 commits intoOct 22, 2026
Merged
Conversation
simonhamp
marked this pull request as ready for review
October 19, 2026 23:33
3 of 4 tasks
mybuddyandrew
added a commit
to mybuddyandrew/devnull-claude
that referenced
this pull request
Oct 20, 2026
…he API Remotes stays hidden until dev-null.sh merges its Remotes API (dev-null-sh/dev-null.sh#649, #654, #656, #657, #658, #665, #734); /api/v1/remotes answers 404 today. Not yet tested live.
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.
Lets the mobile app turn Remotes on and off and change their settings, the way the switch in Settings and the settings menu on the Remotes page do on the web. It's the first of a few small PRs that bring Remotes to the app (NativePHP/dev-null-app) on top of the signed API from #130.
Endpoints
All signed.
PUT /api/v1/me/remoteswithenabled200, the same body asGET /api/v1/mePUT /api/v1/me/remote-preferenceswithfromandpull_receipts200, the same body asGET /api/v1/me.404while Remotes are offGET /api/v1/me(and everything that answers like it) gainsremotes. It'snullwhile the user has Remotes off, the same way the web'sauth.remotesis. Otherwise:requestsandeveryoneare the two config flags, so the app knows whether to show Fetched and whether to offer Everyone.unread_countis what the web's nav badge shows: unread messages plus fetched requests.Rules kept from the web
fromonly takeseveryonewhileremotes.everyoneis on, using the web's rule.404while Remotes are off, like the web's.conversationslimiter (300 a minute). The switch only has the API's 120 a minute, as on the web.Worth checking
unread_countlives insideremotesrather than next tounread_notifications_count. That way every endpoint that answers like/megets it from the resource, without touching five controllers. It reads the signed-in user from the request, asUserResourcedoes forlane.Testing
Everything CI runs passes on this branch locally: Pint, Rector, the JS lint, PHPStan, tsc, type coverage, the JS unit tests, and all 3,242 PHP tests at 100% coverage.