Skip to content

Stop proxying Reddit#1068

Merged
hawkrives merged 2 commits into
masterfrom
reddit/drop-server-fetching
May 11, 2026
Merged

Stop proxying Reddit#1068
hawkrives merged 2 commits into
masterfrom
reddit/drop-server-fetching

Conversation

@drewvolz

Copy link
Copy Markdown
Member

The iOS app now fetches Reddit's JSON API directly on-device, so the server no longer needs to be involved.

What's removed

  • source/ccci-stolaf-college/v1/reddit.ts — route handlers
  • source/feeds/reddit.ts — fetch + parse logic (JSON API and old RSS)
  • source/feeds/reddit.test.ts — tests for the above
  • source/ccc-lib/reddit-auth.ts — OAuth credentials helper (only used by the reddit feed)
  • Route registrations in v1/index.ts

Why

Each device gets its own rate-limit bucket, and the client now has access to the full Reddit JSON response — galleries, polls, crossposts, link URLs — that the server-side approach was losing.

Client-side implementation: StoDevX/AAO-React-Native#7587

drewvolz and others added 2 commits May 10, 2026 12:16
… types

- Replace fetchRedditPosts RSS fetch with JSON API (oauth.reddit.com/r/*/new.json)
- Parse gallery images from media_metadata (HTML-decode & via html-entities)
- Parse crosspost parent from crosspost_parent_list[0] (subreddit/title/author/body/link)
- Parse link URL and domain from url_overridden_by_dest / domain fields
- Parse poll options and vote counts from poll_data
- Normalize special Reddit thumbnail strings ('self', 'default', etc.) to null
- Expand RedditPostSchema with 7 new optional fields (postType, imageUrl, images, linkUrl, linkDomain, crosspostParent, pollData)
- Add CrosspostParentSchema, PollDataSchema, PollOptionSchema types
- Add comprehensive tests for all 5 post types (81 total, all passing)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ectly

The iOS app now fetches Reddit's JSON API directly, eliminating the
server as a middleman. Each device gets its own rate-limit bucket and
the app no longer needs OAuth credentials on the server side.

Removes:
- source/ccci-stolaf-college/v1/reddit.ts
- source/ccci-stolaf-college/v1/index.ts (reddit routes removed)
- source/feeds/reddit.ts
- source/feeds/reddit.test.ts
- source/ccc-lib/reddit-auth.ts

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@drewvolz drewvolz marked this pull request as ready for review May 10, 2026 19:17
@drewvolz drewvolz requested review from hawkrives and rye as code owners May 10, 2026 19:17
@hawkrives hawkrives enabled auto-merge May 11, 2026 03:34
@hawkrives hawkrives added this pull request to the merge queue May 11, 2026
Merged via the queue into master with commit 635adfd May 11, 2026
6 checks passed
@hawkrives hawkrives deleted the reddit/drop-server-fetching branch May 11, 2026 03:36
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