Skip to content

Commit 862d162

Browse files
Fixed some links not being rendered correctly
1 parent 3e6b647 commit 862d162

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
33

44
# Upcoming
55

6-
### 🔄 Changed
6+
### 🐞 Fixed
7+
- Some links not being rendered correctly
78

89
# [4.43.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.43.0)
910
_November 20, 2023_

Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageTypeResolver.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ extension MessageTypeResolving {
6262
}
6363

6464
public func hasLinkAttachment(message: ChatMessage) -> Bool {
65-
!message.linkAttachments.isEmpty
65+
message.allAttachments.contains(where: { attachment in
66+
attachment.type == .linkPreview
67+
})
6668
}
6769

6870
public func hasFileAttachment(message: ChatMessage) -> Bool {

0 commit comments

Comments
 (0)