File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Mixin/Service/DeviceTransfer/TransferMessage Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,12 @@ struct DeviceTransferMessage {
100100 } else {
101101 duration = nil
102102 }
103+ let messageThumbImage : String ?
104+ if let thumbImage, thumbImage. utf8. count > maxThumbImageLength {
105+ messageThumbImage = defaultThumbImage
106+ } else {
107+ messageThumbImage = thumbImage
108+ }
103109 return Message ( messageId: messageId,
104110 conversationId: conversationId,
105111 userId: userId,
@@ -117,7 +123,7 @@ struct DeviceTransferMessage {
117123 mediaStatus: mediaStatus,
118124 mediaWaveform: mediaWaveform,
119125 mediaLocalIdentifier: mediaLocalIdentifier,
120- thumbImage: thumbImage ,
126+ thumbImage: messageThumbImage ,
121127 thumbUrl: thumbUrl,
122128 status: MessageStatus . READ. rawValue,
123129 action: action,
You can’t perform that action at this time.
0 commit comments