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
In a room, if I send a file attachment with unrecognized extension, the application crashes.
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]'
The crash occurs here :
// Prepare the message content for building an echo message
NSMutableDictionary *msgContent = @{
kMXMessageTypeKey: msgType,
kMXMessageBodyKey: filename,
@"url": fakeMediaURI,
@"info": @{
@"mimetype": mimeType,
@"size": @(fileData.length)
},
kMXMessageContentKeyExtensibleTextMSC1767: filename,
kMXMessageContentKeyExtensibleFileMSC1767: @{
kMXMessageContentKeyExtensibleFileSize: @(fileData.length),
kMXMessageContentKeyExtensibleFileName: filename,
kMXMessageContentKeyExtensibleFileURL: fakeMediaURI,
kMXMessageContentKeyExtensibleFileMimeType: mimeType
}.mutableCopy}.mutableCopy;
because mimeType is nil.
When mimeTypeis nil, it shoud fallback to application/octet-stream.
The text was updated successfully, but these errors were encountered:
In a room, if I send a file attachment with unrecognized extension, the application crashes.
The crash occurs here :
because
mimeType
isnil
.When
mimeType
isnil
, it shoud fallback toapplication/octet-stream
.The text was updated successfully, but these errors were encountered: