Skip to content

Commit f1f208a

Browse files
authored
Merge pull request #3298 from GetStream/develop
Next Release
2 parents 8f87fc1 + 49b48dc commit f1f208a

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

package/src/components/ImageGallery/ImageGallery.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)