devvit
devvit copied to clipboard
bug: getCurrentSubredditName does not exist in RedditClient in @devvit/web/server
The reddit client imported from @devvit/web/server does not expose the getCurrentSubredditName() method, which is documented as available on the RedditAPIClient in the public API.
This limits efficient access to the subreddit name in server-side Devvit Web apps.
The documentation does not clarify if or how this method should be accessed in the server context Docs: getCurrentSubredditName().
You can use context.subredditName for this instead, such as shown on the example Submitting a Post.