This repository was archived by the owner on Jul 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,11 @@ def self.messages_from_chat(
7171 thread_title = m . thread &.title if include_thread_titles && m . thread_id
7272 mapped_message = "(#{ thread_title } )\n #{ m . message } " if thread_title
7373
74+ if m . uploads . present?
75+ mapped_message =
76+ "#{ mapped_message } -- uploaded(#{ m . uploads . map ( &:short_url ) . join ( ", " ) } )"
77+ end
78+
7479 builder . push (
7580 type : :user ,
7681 content : mapped_message ,
Original file line number Diff line number Diff line change 240240 )
241241
242242 # Find the message with upload
243- message = context . find { |m | m [ :content ] == [ "Check this image" , { upload_id : upload . id } ] }
243+ message =
244+ context . find do |m |
245+ m [ :content ] ==
246+ [ "Check this image -- uploaded(#{ upload . short_url } )" , { upload_id : upload . id } ]
247+ end
244248 expect ( message ) . to be_present
245249 end
246250
261265 )
262266
263267 # Find the message with upload
264- message = context . find { |m | m [ :content ] == "Check this image" }
268+ message =
269+ context . find { |m | m [ :content ] == "Check this image -- uploaded(#{ upload . short_url } )" }
265270 expect ( message ) . to be_present
266271 expect ( message [ :upload_ids ] ) . to be_nil
267272 end
You can’t perform that action at this time.
0 commit comments