You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1df2433
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: stream-chat-android-client/src/main/java/io/getstream/chat/android/client/attachment/worker/UploadAttachmentsWorker.kt
+12-5Lines changed: 12 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -127,9 +127,8 @@ public class UploadAttachmentsWorker(
127
127
}
128
128
}
129
129
attachments
130
-
} catch (e:CancellationException) {
131
-
throw e
132
130
} catch (e:Exception) {
131
+
// Also reached when the worker is stopped: the failed states release the sender waiting for them.
133
132
logger.e { "[uploadAttachments] #uploader; unable to upload attachments: ${e.message}" }
134
133
attachments.map {
135
134
it.copy(
@@ -176,25 +175,33 @@ public class UploadAttachmentsWorker(
176
175
val uploadedAttachments = message.attachments.mapIndexed { index, original ->
177
176
attachments[index].takeIf { it.uploadState ==Attachment.UploadState.Success } ?: original
Copy file name to clipboardExpand all lines: stream-chat-android-state/src/test/java/io/getstream/chat/android/state/channel/controller/attachment/WhenUploadAttachmentsTests.kt
+34Lines changed: 34 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -365,8 +365,42 @@ internal class WhenUploadAttachmentsTests {
0 commit comments