mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-25 18:14:27 +01:00
Prevent NullPointerException when sending sync groups
ContentType was null, if it could not be determined
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user