Merge pull request #18 from EBendinelli/master

Fix to get the last toot from the account timeline instead of "home"
This commit is contained in:
Dmitri Sotnikov 2019-02-13 11:35:51 -05:00 committed by GitHub
commit 5c45d91c28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -53,6 +53,7 @@ with later timestamps to avoid duplicate posts. On the first run the timestamp w
:rss {"Hacker News" "https://hnrss.org/newest"
"r/Clojure" "https://www.reddit.com/r/clojure/.rss"}
:mastodon {:access_token "XXXX"
:acccount-id "XXXX"
:api_url "https://botsin.space/api/v1/"
;; optional boolean to mark content as sensitive
:sensitive? true

View file

@ -119,7 +119,7 @@
(post-status status-text (not-empty ids)))))
(defn get-mastodon-timeline [callback]
(.then (.get mastodon-client "timelines/home" #js {})
(.then (.get mastodon-client (string/join "" ["accounts/" (:account-id mastodon-config) "/statuses"]) #js {})
#(let [response (-> % .-data js->edn)]
(if-let [error (:error response)]
(exit-with-error error)