Conversation
|
Thanks for the PR! I'm hesitant to merge this because the Bluesky docs recommend that bot accounts should only respond to users who have directly interacted with them first. I'm sure there are use cases for handling nested replies where that is honoured, but I'm not sure I want to make the option available by default, since most users won't read the docs. |
|
While I do understand your hesitation (which is well justified), I believe it's up to the devs to act responsibly. And malicious actors won't stop because some package decided to prevent them to do so (but that's not a reason to purposely make their life easier regardless). Plus, this event would (& imo should) be isolated from the already existing (If you are curious about my use case) |
|
(sorry for the double comment, I just thought about another perspective) And in the case of my bot, the precaution I'm willing to make is: only consider replies which consist of no more than one word of length greater than 5 letters (to avoid congratulating replies like "bravo", "GG", etc. as much as possible). And also avoid replies to threads which are not the current active one. |
I wanted my bot to be able to intercept all replies made below its own posts, regardless of their parent-post.
This PR adds the ability to listen to those kind of replies, without interfering with the
replyevent, and without duplicate issues sincereplytakes precedence.Possible problems: it will take precedence over
quote&mentionif someone happens to quote/mention the bot account in a reply inside a thread initiated by the bot. Note: The same behavior was already happening with thereplyevent.I implemented the event into the polling interceptor as well. I took care to still ignore non-direct replies which are made to threads not initiated by the bot: it can happen when the bot has participated inside a thread and someone replies to a replying post.
Other minor fixes: I replaced
includeswithstartsWith(it's more appropriate to what it's supposed to do, and it's way more efficient; we're inside a Jetstream event handler so it does matter). I also added a/after the did, because, apart from PLC DIDs, they do not have a fixed length.I am opened to any suggestion, including about the event name, I didn't find any naming convention. I could have used a hyphen instead of an underscore. Please suggest away if you happen to think of a better event name. Btw, edits by maintainers are allowed.