Skip to content

Add moderator and Reddit Premium status to User model on public-api#257

Merged
stephenoid merged 2 commits intoreddit:mainfrom
fsvreddit:UserFixes2
Apr 29, 2026
Merged

Add moderator and Reddit Premium status to User model on public-api#257
stephenoid merged 2 commits intoreddit:mainfrom
fsvreddit:UserFixes2

Conversation

@fsvreddit
Copy link
Copy Markdown
Contributor

@fsvreddit fsvreddit commented Apr 28, 2026

Closes #193

💸 TL;DR

My last PR (#256) only made a change on the reddit package for Devvit Web. Sorry about this - this closes the same gaps on the classic reddit-api package.

This pull request addresses two issues on the User model:

  • NSFW property is returning the wrong value - it currently returns the "I am over 18 and want to see NSFW content" property, rather than the "I am NSFW" property.
  • Two underlying properties available on the Data API (isMod and isGold) are not available on the User model. I am now exposing these properly, using the current "Reddit Premium" terminology instead of Reddit Gold.

🧪 Testing Steps / Validation

I have tested these locally by modifying files in the node_modules folder. However it is not possible for me to run full CI on this.

For some time I have had my own User model that transforms these values in the same way.

✅ Checks

  • CI tests (if present) are passing
  • Adheres to code style for repo
  • Contributor License Agreement (CLA) completed if not a Reddit employee

@fsvreddit fsvreddit requested a review from a team as a code owner April 28, 2026 14:32
@stephenoid stephenoid merged commit b666839 into reddit:main Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

User class nsfw getter not wokring

2 participants