diff options
| author | Danilo M. <danix@danix.xyz> | 2026-10-22 11:05:21 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-10-22 11:05:21 +0200 |
| commit | 765dcec1266fc1b63ccf48863f36425400d43dcf (patch) | |
| tree | 3a6319cf0ef2a76fa5325809cfd98a50972aa571 /docs | |
| parent | 94b5892ea311fcb66edee540f360765e2195404d (diff) | |
| download | mygram-droid-765dcec1266fc1b63ccf48863f36425400d43dcf.tar.gz mygram-droid-765dcec1266fc1b63ccf48863f36425400d43dcf.zip | |
Use the /images/:id/like alias, present on older instances too
The live instance predates /api/posts/:id/like; upstream keeps the
/images alias. The instance also has no carousel fields, which Post
already handles by falling back to the top-level media.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/superpowers/plans/2026-10-22-mygram-droid.md | 3 | ||||
| -rw-r--r-- | docs/superpowers/specs/2026-10-22-mygram-droid-design.md | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/superpowers/plans/2026-10-22-mygram-droid.md b/docs/superpowers/plans/2026-10-22-mygram-droid.md index 8342c94..b0c6c02 100644 --- a/docs/superpowers/plans/2026-10-22-mygram-droid.md +++ b/docs/superpowers/plans/2026-10-22-mygram-droid.md @@ -995,8 +995,9 @@ final class Api { return Post.list(call("GET", "/likes"), Prefs.server()); } + /** /images/:id/like: older instances lack /posts/:id/like, newer ones keep this alias. */ static void setLike(int postId, boolean on) throws IOException, JSONException { - call(on ? "POST" : "DELETE", "/posts/" + postId + "/like"); + call(on ? "POST" : "DELETE", "/images/" + postId + "/like"); } /** The session cookie for url, for clients that bypass HttpURLConnection. */ diff --git a/docs/superpowers/specs/2026-10-22-mygram-droid-design.md b/docs/superpowers/specs/2026-10-22-mygram-droid-design.md index a2183b0..69d0b8a 100644 --- a/docs/superpowers/specs/2026-10-22-mygram-droid-design.md +++ b/docs/superpowers/specs/2026-10-22-mygram-droid-design.md @@ -142,7 +142,7 @@ videos only, endless, paged with the same seed. | Unit | Job | | --- | --- | -| `Api` | `HttpURLConnection` + `org.json`. Folders, folder images, feed, reels, likes, like toggle, health, auth status, login. Resolves relative media URLs against the server URL. Sends `x-foldergram-intent: 1` on mutations. | +| `Api` | `HttpURLConnection` + `org.json`. Folders, folder images, feed, reels, likes, like toggle (`POST`/`DELETE /api/images/:id/like`, the alias older instances also have), health, auth status, login. Resolves relative media URLs against the server URL. Sends `x-foldergram-intent: 1` on mutations. | | `Discovery` | Subnet scan for the instance picker. | | `Post` | Data class from feed-item JSON: `id`, folder, `mediaType`, width/height, `durationMs`, `thumbnailUrl`, `previewUrl`, `postType`, `mediaItems` (carousel slides). | | `Likes` | In-memory set of liked post IDs, loaded from `/api/likes` at start, updated on each toggle. Drives every heart indicator. | |
