mv sensitive? to transform

master
jem 4 years ago
parent 0c72647d5b
commit 6ec1930a71

@ -50,8 +50,6 @@ with later timestamps to avoid duplicate posts. On the first run the timestamp w
;; e.g: https://mastodon.social/web/accounts/294795
:account-id "XXXX"
:api_url "https://botsin.space/api/v1/"
;; optional boolean to mark content as sensitive
:sensitive? true
;; optional boolean defaults to false
;; only sources containing media will be posted when set to true
:media-only? true
@ -82,6 +80,8 @@ with later timestamps to avoid duplicate posts. On the first run the timestamp w
;; optional visibility flag: direct, private, unlisted, public
;; defaults to public
:visibility "unlisted"
;; optional boolean to mark content as sensitive
:sensitive? true
;; optional signature for posts
:signature "#newsbot"}}]
}

@ -35,7 +35,8 @@
::signature
::visibility
::append-screen-name?
;::sensitive? ::resolve-urls?
::sensitive?
;::resolve-urls?
;::nitter-urls? ::replacements
]))
(def mastodon-config? (s/merge mastodon-auth? mastodon-target?))
@ -111,8 +112,7 @@
([mastodon-auth target status-text media-ids]
(post-status mastodon-auth target status-text media-ids print))
([mastodon-auth target status-text media-ids callback]
(let [{:keys [sensitive?]} mastodon-auth
{:keys [visibility]} target]
(let [{:keys [visibility sensitive?]} target]
(-> (.post (mastodon-client mastodon-auth) "statuses"
(clj->js (merge {:status (->> status-text
(resolve-urls mastodon-auth)

@ -16,4 +16,5 @@
:target {:type :mastodon-target
:append-screen-name? true
:visibility "unlisted"
:sensitive? true
:signature "my-bot"}}])))