Fix geo-taging.

This commit is contained in:
John Wiseman 2019-12-20 21:33:21 -08:00
parent 19ca5c4735
commit 9c17f86f53
2 changed files with 5 additions and 3 deletions

View File

@ -417,7 +417,9 @@
(if (get-in config [:twitter :enabled?]) (if (get-in config [:twitter :enabled?])
(twitter/tweet (twitter/twit (:twitter config)) (twitter/tweet (twitter/twit (:twitter config))
description description
[image-path]) [image-path]
lat
lon)
(log-warn "Skipping tweeting")) (log-warn "Skipping tweeting"))
(log-warn "Skipping tweet %s %s" image-path description))))))))))) (log-warn "Skipping tweet %s %s" image-path description)))))))))))

View File

@ -35,7 +35,7 @@
;; Posts a tweet with optional multiple media. Returns a promise that ;; Posts a tweet with optional multiple media. Returns a promise that
;; resolves to the response result. ;; resolves to the response result.
(defn tweet [twit status image-paths lat long] (defn tweet [twit status image-paths lat lon]
(p/then (p/all (map #(upload-image twit %) image-paths)) (p/then (p/all (map #(upload-image twit %) image-paths))
(fn [media-ids] (fn [media-ids]
(log-info "Tweeting status:'%s' with media: %s" status media-ids) (log-info "Tweeting status:'%s' with media: %s" status media-ids)
@ -43,7 +43,7 @@
(clj->js {:status status (clj->js {:status status
:media_ids [media-ids] :media_ids [media-ids]
:lat lat :lat lat
:long long :long lon
:display_coordinates true :display_coordinates true
})) }))
result (js->clj result :keywordize-keys true)] result (js->clj result :keywordize-keys true)]