Closed nickwynja closed 3 years ago
I have a working version by taking a different approach and would some feedback on it. In transform()
, I've added a value of value.meta.blocking
to each message based on getRelationship()
. Then I can use a simple filter:
const t = thread.filter(msg => !msg.value.meta.blocking);
The upside of this is that msg.value.meta.blocking
could be used in various places like in the UI. Any downsides to this approach?
This should have been fixed by https://github.com/fraction/oasis/pull/585 , are you sure you're running latest master?
That only fixes not displaying root posts from blocked people. A problem that pops up all throughout Oasis (which I believe @georgeowell has mentioned in the past) is that the socialFilter
only applies to the first level of items in the list. Comments/replies/children don't seem to be processed by the socialFilter
.
I'm playing a bit more with the blocking
attributes in the UI. It might help as a blanket case until we're able to get the queries to filter out consistently. It's a bit hacky but is a start.
I've opened a #624 to address this. For now, I've left out the filtering mentioned above and am simply replacing the post content with a message instead.
What's the problem you want solved?
The comments on a thread show content from people marked as blocked.
Is there a solution you'd like to recommend?
I've taken a swing at fixing this but I'm all turned around. I've attempted to
filter
the thread based on the result ofmodels.friend..getRelationship(msg.value.author)
but am struggling with JS here.From models.js:
Obviously, I'm just debugging here instead of doing anything practical but every which way I tried to apply this filter didn't work. Happy to keep chipping away on something and open a PR if anyone is able to point me in the right direction.