parent
04382927af
commit
a987ffee7c
|
@ -47,24 +47,6 @@
|
||||||
#{c/content-type-command c/content-type-command-request}
|
#{c/content-type-command c/content-type-command-request}
|
||||||
type))
|
type))
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
(defn get-messages [chat-id]
|
|
||||||
(->> (-> (r/get-by-field :msgs :chat-id chat-id)
|
|
||||||
(r/sorted :timestamp :desc)
|
|
||||||
(r/collection->map))
|
|
||||||
(into '())
|
|
||||||
;; todo why reverse?
|
|
||||||
reverse
|
|
||||||
(map (fn [{:keys [content-type preview] :as message}]
|
|
||||||
(if (command-type? content-type)
|
|
||||||
(-> message
|
|
||||||
(update :content str-to-map)
|
|
||||||
(assoc :rendered-preview (when preview
|
|
||||||
(generate-hiccup
|
|
||||||
(read-string preview))))
|
|
||||||
(dissoc :preview))
|
|
||||||
message)))))
|
|
||||||
=======
|
|
||||||
(defn get-messages
|
(defn get-messages
|
||||||
([chat-id] (get-messages chat-id 0))
|
([chat-id] (get-messages chat-id 0))
|
||||||
([chat-id from]
|
([chat-id from]
|
||||||
|
@ -78,7 +60,6 @@
|
||||||
(if (command-type? content-type)
|
(if (command-type? content-type)
|
||||||
(update message :content str-to-map)
|
(update message :content str-to-map)
|
||||||
message))))))
|
message))))))
|
||||||
>>>>>>> develop
|
|
||||||
|
|
||||||
(defn update-message! [{:keys [msg-id] :as msg}]
|
(defn update-message! [{:keys [msg-id] :as msg}]
|
||||||
(log/debug "update-message!" msg)
|
(log/debug "update-message!" msg)
|
||||||
|
|
Loading…
Reference in New Issue