We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36c3952 commit 1b10062Copy full SHA for 1b10062
1 file changed
Mixin/Service/DeviceTransfer/TransferMessage/DeviceTransferMessage.swift
@@ -100,6 +100,12 @@ struct DeviceTransferMessage {
100
} else {
101
duration = nil
102
}
103
+ let messageThumbImage: String?
104
+ if let thumbImage, thumbImage.utf8.count > maxThumbImageLength {
105
+ messageThumbImage = defaultThumbImage
106
+ } else {
107
+ messageThumbImage = thumbImage
108
+ }
109
return Message(messageId: messageId,
110
conversationId: conversationId,
111
userId: userId,
@@ -117,7 +123,7 @@ struct DeviceTransferMessage {
117
123
mediaStatus: mediaStatus,
118
124
mediaWaveform: mediaWaveform,
119
125
mediaLocalIdentifier: mediaLocalIdentifier,
120
- thumbImage: thumbImage,
126
+ thumbImage: messageThumbImage,
121
127
thumbUrl: thumbUrl,
122
128
status: MessageStatus.READ.rawValue,
129
action: action,
0 commit comments