This commit is contained in:
2026-02-17 18:54:08 -05:00
parent f7e2755a91
commit 7fd8d7c4eb
17 changed files with 293 additions and 874 deletions
+2 -1
View File
@@ -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}))))