Prevent NullPointerException when sending sync groups
ContentType was null, if it could not be determined
This commit is contained in:
parent
c0a0f89896
commit
9f075da269
@ -464,6 +464,9 @@ class Manager implements Signal {
|
||||
InputStream attachmentStream = new FileInputStream(attachmentFile);
|
||||
final long attachmentSize = attachmentFile.length();
|
||||
String mime = Files.probeContentType(attachmentFile.toPath());
|
||||
if (mime == null) {
|
||||
mime = "application/octet-stream";
|
||||
}
|
||||
return new SignalServiceAttachmentStream(attachmentStream, mime, attachmentSize, null);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user