File tree Expand file tree Collapse file tree 1 file changed +12
-14
lines changed
package/src/components/ImageGallery Expand file tree Collapse file tree 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -210,20 +210,18 @@ export const ImageGallery = (props: Props) => {
210210 ( ) =>
211211 messages . reduce ( ( acc : Photo [ ] , cur ) => {
212212 const attachmentImages =
213- cur . attachments
214- ?. filter (
215- ( attachment ) =>
216- ( attachment . type === FileTypes . Giphy &&
217- ( attachment . giphy ?. [ giphyVersion ] ?. url ||
218- attachment . thumb_url ||
219- attachment . image_url ) ) ||
220- ( attachment . type === FileTypes . Image &&
221- ! attachment . title_link &&
222- ! attachment . og_scrape_url &&
223- getUrlOfImageAttachment ( attachment ) ) ||
224- ( isVideoPlayerAvailable ( ) && attachment . type === FileTypes . Video ) ,
225- )
226- . reverse ( ) || [ ] ;
213+ cur . attachments ?. filter (
214+ ( attachment ) =>
215+ ( attachment . type === FileTypes . Giphy &&
216+ ( attachment . giphy ?. [ giphyVersion ] ?. url ||
217+ attachment . thumb_url ||
218+ attachment . image_url ) ) ||
219+ ( attachment . type === FileTypes . Image &&
220+ ! attachment . title_link &&
221+ ! attachment . og_scrape_url &&
222+ getUrlOfImageAttachment ( attachment ) ) ||
223+ ( isVideoPlayerAvailable ( ) && attachment . type === FileTypes . Video ) ,
224+ ) || [ ] ;
227225
228226 const attachmentPhotos = attachmentImages . map ( ( a ) => {
229227 const imageUrl = getUrlOfImageAttachment ( a ) as string ;
You can’t perform that action at this time.
0 commit comments