Skip to content

feat: stash conversations and merge or drop requests in Remotes from the API - #657

Merged
xHeaven merged 8 commits into
dev-null-sh:productionfrom
simonhamp:feat/api-remotes-stash
Oct 22, 2026
Merged

xHeaven merged 8 commits into
dev-null-sh:productionfrom
simonhamp:feat/api-remotes-stash

Conversation

@simonhamp

Copy link
Copy Markdown
Contributor

Lets the mobile app stash and pop conversations and orgs, and merge or drop a fetched request, the way the web's conversation menu and request bar do. It's one of a few small PRs that bring Remotes to the app (NativePHP/dev-null-app) on top of the signed API from #130. It stands alone against production.

Endpoints

All signed, all answer 204, and all go through the web's conversations limiter (300 a minute).

Request Does
POST /api/v1/remotes/@{username}/archive Stashes the conversation for the user only
DELETE /api/v1/remotes/@{username}/archive Pops it back into Open
POST /api/v1/remotes/orgs/{id}/archive Stashes the org for the user only
DELETE /api/v1/remotes/orgs/{id}/archive Pops it back
POST /api/v1/remotes/@{username}/merge Merges a request fetched for the user, so they can reply
POST /api/v1/remotes/@{username}/drop Drops it without telling the sender

Rules kept from the web

The controllers and form requests are copies of the web's, and the actions are the web's own.

  • Stashing someone the user hasn't talked to yet does nothing.
  • A stashed conversation pops back when anyone in it writes.
  • Merge and drop only exist while remotes.requests is on, and only for a request fetched for the user. Anything else is a 404, so the sender can't merge their own request.
  • Everything is a 404 while the user has Remotes off, across a block, and for an org they aren't in.

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,243 PHP tests at 100% coverage.

@simonhamp
simonhamp marked this pull request as ready for review October 19, 2026 23:45
@xHeaven
xHeaven merged commit 2791377 into dev-null-sh:production Oct 22, 2026
5 checks passed
@simonhamp
simonhamp deleted the feat/api-remotes-stash branch October 22, 2026 11:01
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