yogthos / mastodon-bot

a bot for mirroring Twitter/Tumblr accounts and RSS feeds on Mastodon
https://mastodon.social/@newsbot
MIT License
192 stars 24 forks source link

Visibility always set to unlisted #68

Open EBendinelli opened 3 years ago

EBendinelli commented 3 years ago

Problem: all toots posted by mastodon-bot are unlisted idependantly of the value of "visibility" How to reproduce: Change visibility value in config.edn, posts are always unlisted

So I made a huge version jump as the result of a server move and with the latest version of mastodon-bot all the toos on our account are unlisted (see: https://mastodon.xyz/web/accounts/257584 )

I've tried commenting the visibility parameter, setting it to "public" but it seems to have no effect. Nothing changed on the account side but I checked and the default visibility is "public"

Here is my config.edn:

{:auth {;; add Twitter config to mirror Twitter accounts
        :twitter {:consumer_key "xxx"
                  :consumer_secret "xxx"
                  :access_token_key "xxx"
                  :access_token_secret "xxx"}
        :mastodon {:access_token "xxx"
                   ;; account number you see when you log in and go to your pro
                   ;; e.g: https://mastodon.social/web/accounts/294795
                   :account-id "257584"
                   :api_url "https://mastodon.xyz/api/v1/"}}
:transform [{:source {:source-type :twitter
                       ;; optional, defaults to false
                       :include-replies? true
                       ;; optional, defaults to false
                       :include-rts? false
                       ;; Replace Twitter links by Nitter
                       :nitter-urls? true
                       ;; accounts you wish to mirror
                       :accounts ["privacyint"]}
             :target {:target-type :mastodon
                      ;; optional flag specifying wether the name of the account
                      ;; will be appended in the post, defaults to false
                      :append-screen-name? false
                      ;; optional visibility flag: direct, private, unlisted, public
                      ;; defaults to public
                      :visibility "public"
                      ;; optional boolean to mark content as sensitive. Defaults to true.
                      :sensitive? false
                      ;; optional boolean defaults to false
                      ;; only sources containing media will be posted when set to true
                      :media-only? false}
             ;; optionally try to resolve URLs in posts to skip URL shorteners
             ;; defaults to false
             :resolve-urls? true}
             ]
}

I checked the code but don't seem to spot anything weird. Is anyone able to reproduce? Thanks.

EBendinelli commented 3 years ago

Uping this issue as I'm now having the resolve-urls parameter being ignored. I checked my config (same as above) adn permissions (shouldn't be an issue since posting occurs). The output doesn't have any interesting information:

`

js {:data #js {:id 105581970132294907, :created_at 2021-01-19T10:43:31.141Z, :in_reply_to_id nil, :in_reply_to_account_id nil, :sensitive false, :spoiler_text , :visibility unlisted, :language en, :uri https://mastodon.xyz/users/privacyint/statuses/105581970132294907, :url https://mastodon.xyz/@privacyint/105581970132294907, :replies_count 0, :reblogs_count 0, :favourites_count 0, :favourited false, :reblogged false, :muted false, :bookmarked false, :pinned false, :content

@DrTedros @WHO notes that equitable access is key. If not it will “only prolong the pandemic, the restrictions needed to contain it, & human & economic suffering”.

schemes must not perpetuate/reinforce exclusionary+discriminatory practices👇
t.co/L4Set6O8xK...

, :reblog nil, :application #js {:name Twitter to Mastodon bot, :website }, :account #js {:id 257584, :username privacyint, :acct privacyint, :display_name Privacy International, :locked false, :bot false, :discoverable true, :group false, :created_at 2019-02-04T14:53:50.301Z, :note

We fight for the right to privacy across the world. Sign up for all things action.privacyinternational.or

, :url https://mastodon.xyz/@privacyint, :avatar https://6-28.mastodon.xyz/accounts/avatars/000/257/584/original/b7db2eb789336af6.png, :avatar_static https://6-28.mastodon.xyz/accounts/avatars/000/257/584/original/b7db2eb789336af6.png, :header https://6-28.mastodon.xyz/accounts/headers/000/257/584/original/4c95a173bd2afc26.png, :header_static https://6-28.mastodon.xyz/accounts/headers/000/257/584/original/4c95a173bd2afc26.png, :followers_count 2568, :following_count 69, :statuses_count 2435, :last_status_at 2021-01-19, :emojis #js [], :fields #js [#js {:name Website, :value privacyinternational.org, :verified_at nil} #js {:name Support, :value support.privacyinternational.o, :verified_at nil} #js {:name Action, :value action.privacyinternational.or, :verified_at nil}]}, :media_attachments #js [], :mentions #js [], :tags #js [#js {:name covidvaccine, :url https://mastodon.xyz/tags/covidvaccine}], :emojis #js [], :card nil, :poll nil}, :resp #object[IncomingMessage [object Object]]}

`

Anything else I can check to troubleshout the issue? Script running on Alpine 3.12.1.

jerger commented 3 years ago

I will add some debug output on the next ocassion & prettyprint the outputs.