You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you ban a user from a Devvit app and provide a value for context (which is supposed to be the T1ID/T3ID of the content the user is being banned for), the message received by the user doesn't contain a link to the content:
Hello, You have been banned from participating in r/fsvsandbox for 1 day because you broke this community's rules. You won't be able to post or comment, but you can still view and subscribe to it.
What I would expect is:
Hello, You have been banned from participating in r/UKInvesting for 999 days because [your post](link) violates this community's rules. You won't be able to post or comment, but you can still view and subscribe to it.
<!-- If this pull request closes an issue, please mention the issue
number below -->
Fixes#99
## 💸 TL;DR
When a user is banned, the `context` property of the BanUserOptions type
is not passed up to User.createRelationship. This means that the modmail
received by the user does not include full details of why the user has
been banned.
## 🧪 Testing Steps / Validation
Example code:
Via reddit API:
```ts
await context.reddit.banUser({
subredditName: "fsvsandbox",
username: "fsvtestalt",
context: "t3_1esvalw",
duration: 1,
});
```
Via method on `Subreddit` class:
```ts
const subreddit = await context.reddit.getCurrentSubreddit();
await subreddit.banUser({
username: "fsvtestalt",
context: "t3_1esvalw",
duration: 1,
});
```
Expected outcome: the modmail sent to the end user should include a link
to the post or comment that is referenced by the context attribute.
## ✅ Checks
<!-- Make sure your pr passes the CI checks and do check the following
fields as needed - -->
- [x] CI tests (if present) are passing
- [x] Adheres to code style for repo
- [x] Contributor License Agreement (CLA) completed if not a Reddit
employee
If you ban a user from a Devvit app and provide a value for
context
(which is supposed to be the T1ID/T3ID of the content the user is being banned for), the message received by the user doesn't contain a link to the content:What I would expect is:
Example code:
The text was updated successfully, but these errors were encountered: