Hey, @[email protected]. I was trying to find a way to customize what showed up in the Stream for microblog, when I found this code:
try:
from data.stream import ( # type: ignore # noqa: F401, E501
custom_stream_visibility_callback,
)
stream_visibility_callback = custom_stream_visibility_callback
It looks like there is supposed to be a way to customize it by writing this custom_stream_visibility_callback
.
I think what I'm supposed to do is create a file at data/stream.py
, and basically put the function in there, modeling it after the default_stream_visibility_callback
in app/customization.py
.
Am I understanding that correctly? I couldn't find any mention of this in the docs.
Awesome! Thank you. That example is exactly one of the use cases I was thinking for it.
The other use case I was thinking was filtering out any Announce
from a particular user (some people just boost way too much), which I guess I can check the remote_object
for.
@[email protected] it does not support filtering announce yet, that is one of the upcoming breaking changes. Right now the function is not called at all.
I will try to remember pinging you when I pushed an update.
In the meantime, by going to the actor "profile", you can hide all the boosts for a given actor with the "hide shares" button.
@[email protected] Hey!
This is an upcoming feature, it's not documented yet because I might make breaking changes before it gets "stable".
If you want to try it anyway, yes you can create a file at
data/stream.py
, and here is an example:(but check for breaking changes when you update)