postiz-app
postiz-app copied to clipboard
No clear error message for users when adding a non postable reddit sub
📜 Description
Selecting a reddit sub in dropdown which needs approval or membership like /r/TestFlight results in
{ message: 'Forbidden', error: 403 } [Nest] 82662 - 03.09.2024, 15:16:40 ERROR [ExceptionsHandler] Body is unusable: Body has already been read on console
👟 Reproduction steps
try adding a reddit sub like /r/TestFlight r
👍 Expected behavior
It should inform the user that he has to join the sub before he can send something
👎 Actual Behavior with Screenshots
it adds a non usable sub
💻 Operating system
Linux
🤖 Node Version
20
📃 Provide any additional context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
- [X] I checked and didn't find similar issue
Are you willing to submit PR?
None
King 🤴🏿 Mind working on it?
I will. Where do I stsrt lookang into, any leads? Thank you
can you assign this to me ?
can this ticket be assigned to me ?
Related - this filter of the Reddit API response removes subs that are restricted or private, even though the user may have permission to post in that subreddit
https://github.com/gitroomhq/postiz-app/blob/64d2fddd249dbb9373e30c26751f86a49a20ddc3/libraries/nestjs-libraries/src/integrations/social/reddit.provider.ts#L249
To enable restricted subreddits (for example) change to:
(data.subreddit_type === 'public' || data.subreddit_type === 'restricted') && data.submission_type !== 'image')
Not sure if that will cause any downstream issues with subreddits that user is actually unable to post to.
This issue is stale because it has been open for 90 days with no activity.
This issue was closed because it has been inactive for 7 days since being marked as stale.