File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
Sources/StreamChatSwiftUI/ChatChannel/MessageList Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
3
3
4
4
# Upcoming
5
5
6
- ### 🔄 Changed
6
+ ### 🐞 Fixed
7
+ - Fix WebView error handling to enable mp3 attachments loading [ #904 ] ( https://github.com/GetStream/stream-chat-swiftui/pull/904 )
7
8
8
9
# [ 4.83.0] ( https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.83.0 )
9
10
_ July 29, 2025_
Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ struct WebView: UIViewRepresentable {
71
71
didFailProvisionalNavigation navigation: WKNavigation ! ,
72
72
withError error: Error
73
73
) {
74
+ // Ignore "Plug-in handled load" error as it's actually success for audio files
75
+ let nsError = error as NSError
76
+ if nsError. domain == " WebKitErrorDomain " && nsError. code == 204 {
77
+ return
78
+ }
79
+
74
80
isLoading. wrappedValue = false
75
81
self . error. wrappedValue = error
76
82
}
@@ -80,6 +86,12 @@ struct WebView: UIViewRepresentable {
80
86
didFail navigation: WKNavigation ! ,
81
87
withError error: Error
82
88
) {
89
+ // Ignore "Plug-in handled load" error as it's actually success for audio files
90
+ let nsError = error as NSError
91
+ if nsError. domain == " WebKitErrorDomain " && nsError. code == 204 {
92
+ return
93
+ }
94
+
83
95
isLoading. wrappedValue = false
84
96
self . error. wrappedValue = error
85
97
}
You can’t perform that action at this time.
0 commit comments