robertoszek / pleroma-bot

Bot for mirroring one or multiple Twitter accounts in Pleroma/Mastodon/Misskey.
https://robertoszek.github.io/pleroma-bot
MIT License
103 stars 19 forks source link

Add "application_name" config #100

Closed reorx closed 1 year ago

reorx commented 1 year ago

This config is used for finding the latest status that is created specifically by this bot, to avoid getting the wrong date if there are new statuses posted from other appliations like Pleroma FE.

If this config is not set, the behavior will be the same as before this commit; If set, when the user post new statuses manually through the Pleroma FE interface after last pleroma-bot run, these statuses will be excluded in get_date_last_pleroma_post(), making the returned date exactly the same as the last synced tweet.

codecov[bot] commented 1 year ago

Codecov Report

Base: 100.00% // Head: 99.59% // Decreases project coverage by -0.40% :warning:

Coverage data is based on head (887794a) compared to base (64e2651). Patch coverage: 25.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #100 +/- ## =========================================== - Coverage 100.00% 99.59% -0.41% =========================================== Files 11 11 Lines 1712 1720 +8 =========================================== + Hits 1712 1713 +1 - Misses 0 7 +7 ``` | [Impacted Files](https://codecov.io/gh/robertoszek/pleroma-bot/pull/100?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [pleroma\_bot/cli.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/100/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvY2xpLnB5) | `100.00% <ø> (ø)` | | | [pleroma\_bot/\_pleroma.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/100/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX3BsZXJvbWEucHk=) | `95.80% <25.00%> (-4.20%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

robertoszek commented 1 year ago

Looks great! Makes total sense to filter them if you're mirroring into a personal account in which you also post from other apps (or frontends).

I've looked into Misskey's API but unfortunately it seems they don't expose that info (or I haven't found the way to get it yet), so this would only work for Pleroma and Mastodon.

I'll merge it into the develop branch so I can add some coverage tests and documentation for this. Thank you for your contribution!