Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only thread replies? #112

Open
dawnerd opened this issue Jan 18, 2023 · 4 comments
Open

Only thread replies? #112

dawnerd opened this issue Jan 18, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@dawnerd
Copy link

dawnerd commented Jan 18, 2023

It seems threads are not pulled in unless replies: true which isn't very useful for the accounts I have set up. Since they're mostly PR related it's a ton of responses to customers and gets very noisy. Are threads supposed to be included by default? Could there be a way to only grab them?

@robertoszek
Copy link
Owner

robertoszek commented Jan 18, 2023

Hi!
Right, technically threads are just replies from users to themselves.
So in the current version they get filtered out when setting include_replies to false.

We could include a check before filtering the replies to see if the the user is replying to themselves and keep it when a certain mapping is set to true.

I'm trying to think what would be the easiest way to define this on the configuration, would something like this make sense?:

include_replies: false
include_threads: true

@robertoszek robertoszek added the enhancement New feature or request label Jan 18, 2023
@dawnerd
Copy link
Author

dawnerd commented Jan 18, 2023

include_threads would definitely do the trick.

@robertoszek robertoszek self-assigned this Jan 21, 2023
@robertoszek
Copy link
Owner

robertoszek commented Jan 21, 2023

Alright, on 1.2.1rc6 this should do it:
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pleroma-bot==1.2.1rc6

As mentioned above, by setting the mapping include_threads to true should keep the Twitter threads even if the replies are filtered.

So this config, for example:

twitter_token: XXX
- twitter_username: XXX
  pleroma_username: XXX
  pleroma_token: XXX
  bot: true
  include_replies: false
  include_threads: true  <--

(or this one if if you want it to apply it globally to all the users):

twitter_token: XXX
include_replies: false
include_threads: true  <--
- twitter_username: XXX
  pleroma_username: XXX
  pleroma_token: XXX
  bot: true

I'll need to write some coverage tests and documentation before rolling it out to the stable release.

@dawnerd
Copy link
Author

dawnerd commented Jan 22, 2023

Just gave this a shot and it seems to work beautifully! Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants