robertoszek / pleroma-bot

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

Bump to v1.2.0 #107

Closed robertoszek closed 1 year ago

robertoszek commented 1 year ago

Fixed

Enhancements

Added

codecov[bot] commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (9436ed1) compared to base (248f65d). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #107 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 10 12 +2 Lines 1586 1993 +407 ========================================== + Hits 1586 1993 +407 ``` | [Impacted Files](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [pleroma\_bot/\_\_init\_\_.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX19pbml0X18ucHk=) | `100.00% <100.00%> (ø)` | | | [pleroma\_bot/\_cohost.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX2NvaG9zdC5weQ==) | `100.00% <100.00%> (ø)` | | | [pleroma\_bot/\_misskey.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX21pc3NrZXkucHk=) | `100.00% <100.00%> (ø)` | | | [pleroma\_bot/\_pin.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX3Bpbi5weQ==) | `100.00% <100.00%> (ø)` | | | [pleroma\_bot/\_pleroma.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX3BsZXJvbWEucHk=) | `100.00% <100.00%> (ø)` | | | [pleroma\_bot/\_processing.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX3Byb2Nlc3NpbmcucHk=) | `100.00% <100.00%> (ø)` | | | [pleroma\_bot/\_twitter.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX3R3aXR0ZXIucHk=) | `100.00% <100.00%> (ø)` | | | [pleroma\_bot/\_utils.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvX3V0aWxzLnB5) | `100.00% <100.00%> (ø)` | | | [pleroma\_bot/cli.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/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% <100.00%> (ø)` | | | [pleroma\_bot/tests/conftest.py](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-cGxlcm9tYV9ib3QvdGVzdHMvY29uZnRlc3QucHk=) | `100.00% <100.00%> (ø)` | | | ... and [3 more](https://codecov.io/gh/robertoszek/pleroma-bot/pull/107/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | | 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.

tomakun commented 1 year ago

Hi @robertoszek, Please allow me to ask a couple of questions regarding this release:

Native retweet support, now users in your config should be able to reblog their own and each other's posts if they are on the same instance.

Is the above compatible with the custom_replacements mapping feature? Considering the following:

custom_replacements:
"@twitter_user1": "@fedi_user1"
"@twitter_user2: "@fedi_user2"

On Twitter @twitter_user1 RTs @twitter_user2. Will the bot/instance realize they are retweeting each other if the custom_replacement mapping is being used?


application_name mapping, for specifying the Fediverse application name to use as a filter when getting the date of the latest published post by the bot. Thanks @reorx!

What problem does this solve? Should all bots have different application names? Currently I have 3 mastodon users in place using the same application name (pleroma-bot). Will this be a problem?

Thank you for your time.

robertoszek commented 1 year ago

Hey @tomakun Sure, let me try to answer the questions you had.

Is the above compatible with the custom_replacements mapping feature? Considering the following:

Short answer: Yes. Long answer: The native retweet/thread feature of the bot does not check for the contents or text on the Fediverse post. Instead it checks if the tweet ID returned by Twitter's API in the field "_repliedto" or "retweeted" was published on the Fediverse instance. It does so by searching the tweet ID on the posts.json file generated at the config file path. So no matter if the text was changed (by adding a signature, a date, a replacement, etc.) the ID of the post on the Fediverse instance and the tweet ID will remain unchanged.


Regarding application_name:

Should all bots have different application names? [...] Will this be a problem?

Not really. It shouldn't be a problem, if those Mastodon users are just publishing posts with the bot.

What problem does this solve?

Let me try to explain, take this hypothetical example. I'm an user who is using the bot with my personal Mastodon account. I'm mirroring my Twitter account into my Mastodon account and it's working fine. One problem though, the bot checks the date of the last post published on my Mastodon account. But I happen to post often manually from my Mastodon client, so the bot wrongly assumes the last post I created from my client is the last one mirrored from Twitter (as it takes the date from the latest post).

So, here comes application_name, if I specify that the bot is publishing posts with the app name pleroma-bot for example, it can check which post was actually the latest one published with the bot. No matter if I'm posting manually from other clients or from the Mastodon web app, it will continue mirroring from where it left off.

tomakun commented 1 year ago

@robertoszek Many thanks for the explanations, this is all very clear. The application_name implementation is clever! Great stuff.

Thank you again for your time and support, I'll make sure to support myself via your other contributions channels.