trustroots
trustroots copied to clipboard
A mechanism for users to block abusive users
Is your feature request related to a problem? Please describe. Users would need to be able to block each other right away, without writing to and waiting for support to remove offending users.
- [x] Add API. Done in https://github.com/Trustroots/trustroots/pull/1490
- [x] Administrative user should be able to list a user nonetheless
- [ ] Hide messages and events in both ways
- [ ] Anything else that needs to be hidden from blocked users?
- [x] Add UI for blocking users in website https://github.com/Trustroots/trustroots/pull/2121
- [x] In the message thread
- [x] In profile
- [x] Add UI for un-blocking users in website https://github.com/Trustroots/trustroots/pull/2121
- [x] In the message thread
- [x] In profile
- [ ] Add UI to see blocked users as a list at your account
- [ ] Add UI in native mobile app (https://github.com/Trustroots/trustroots-mobile)
Describe the solution you'd like
Add "block member" link in users' profiles:
Clicking the button can open regular JS window.confirm()
question, doesn't need anything fancier:

(with different text ;-) )
Confirming this, it will add blocked user's ID in authenticated user's profile.
When A wants to block B, A will end up with profile data looking like:
user: A,
blocked: [ B ]
This should work similar to shadowban
role (see code, or issue https://github.com/Trustroots/trustroots/issues/1184) in a way that blocker user just gets hidden for the other user quietly.
Describe alternatives you've considered —
Additional context
This will help us comply with Apple's app review requirement: https://github.com/Trustroots/trustroots-expo-mobile/issues/10#issuecomment-631104166 ...and it's a nice safety feature regardless.
Working on an api for it. (PR #1490)
could this be a simple check box in the report dialog box?
Good idea!
There's still value in having two separate links in the profile, but the "block member" could bring to "report member" support form with "[x] block reported member from seeing me" pre-checked.
When regularly reporting member, the check could be unchecked.
That said, if it's easier for someone to implement the "click + confirm" thing, that's fine too. Just to get the ball rolling and we can then iterate.
Client-side implementation:
Copy this component in the same file:
https://github.com/Trustroots/trustroots/blob/56adf8076a77ed1d91a88d3406196300bc99a48a/modules/users/client/views/profile/profile-view-basics.client.view.html#L6-L9
Here's the component to duplicate:
https://github.com/Trustroots/trustroots/blob/56adf8076a77ed1d91a88d3406196300bc99a48a/modules/support/client/components/ReportMemberLink.component.js
Here's an example of API file you'll need:
https://github.com/Trustroots/trustroots/blob/56adf8076a77ed1d91a88d3406196300bc99a48a/modules/tribes/client/api/tribes.api.js#L1-L6
And here's an example of how to use API function:
https://github.com/Trustroots/trustroots/blob/2c9d436140383a1420aabe8c4a81292f1352c9e3/modules/tribes/client/components/JoinButton.js#L81-L95
And maybe as a result, you can just show a success message with window.alert('Some message')
and/or just redirect to the homepage after success?
Here's what the backend API expects:
https://github.com/Trustroots/trustroots/blob/baad4238000cae44479e018c57e110dab60de498/modules/users/server/controllers/users.block.server.controller.js#L34-L75
So looks like something like profile: { _id: USER_ID_HERE }
...in route /api/blocked-users/USERNAME
:
https://github.com/Trustroots/trustroots/blob/baad4238000cae44479e018c57e110dab60de498/modules/users/server/routes/users-block.server.routes.js#L14-L19
I just want to say that i second and support this feature. In couchsurfing I blocked users but they still commented and harassed my events. Blocking must be ''catholic' if i can use this term. When I block someone in TR he/she cannot see what im writing in other parts of the app. Is that technically easy? I dont know. I am just sharing my bad experience with the blocking function in couchsurfing app. Blocked users still could chat me and harass me in the hang-out chat function of the CS app and leave trolling comments on every single event I created. So blocking him in couchsurfing amounted next to nothing in terms of giving me some peace from haters/trolls.
@annazi-maker we at Trustroots have zero tolerance for harassment so in cases where they'd be able to interact in public spaces, our support would suspend them for such behavior.
Thanks for sharing your thoughts!
Are we almost finished with these tasks? Who can finish this off so we can re submit for review? @gabrielsr Do you have any time? I know that @simison has been busy with other projects..
I think important parts that Apple requested are now in. Would be good to add FAQ entry and the rest are "nice to have" follow-ups.
Where is this stuck on? @simison Could we help diploy this in any way?