[#15950] Updated build-image-messages (#16518)

Author: andresceballosm <ceballosmarandres@gmail.com>
This commit is contained in:
Andrés Felipe Ceballos M 2023-07-12 08:04:29 -05:00 committed by GitHub
parent 6c28e9349f
commit c55f12ecf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 8 deletions

View File

@ -167,14 +167,16 @@
{:keys [message-id]} (get-in db [:chat/inputs chat-id :metadata :responding-to-message])
album-id (str (random-uuid))]
(mapv (fn [[_ {:keys [resized-uri width height]}]]
{:chat-id chat-id
:album-id album-id
:content-type constants/content-type-image
:image-path (utils.string/safe-replace resized-uri #"file://" "")
:image-width width
:image-height height
:text input-text
:response-to message-id})
{:chat-id chat-id
:album-id album-id
:content-type constants/content-type-image
:image-path (utils.string/safe-replace resized-uri #"file://" "")
:image-width width
:image-height height
:text input-text
:link-previews (map #(select-keys % [:url :title :description :thumbnail])
(get-in db [:chat/link-previews :unfurled]))
:response-to message-id})
images)))
(rf/defn clean-input