update
This commit is contained in:
@@ -169,10 +169,11 @@
|
||||
;;; ---------------------------------------------------------------------------
|
||||
|
||||
(defn get-messages
|
||||
"Fetch messages for a channel. opts: :before :limit"
|
||||
"Fetch messages for a channel. opts: :before :after :limit"
|
||||
[ctx channel-id & [opts]]
|
||||
(let [qp (cond-> {}
|
||||
(:before opts) (assoc "before" (str (:before opts)))
|
||||
(:after opts) (assoc "after" (str (:after opts)))
|
||||
(:limit opts) (assoc "limit" (str (:limit opts))))]
|
||||
(request! ctx :get (str "/api/channels/" channel-id "/messages")
|
||||
(when (seq qp) {:query-params qp}))))
|
||||
|
||||
Reference in New Issue
Block a user