class Utils {
static List<SignalServiceAttachment> getSignalServiceAttachments(List<String> attachments) throws AttachmentInvalidException {
- List<SignalServiceAttachment> SignalServiceAttachments = null;
+ List<SignalServiceAttachment> signalServiceAttachments = null;
if (attachments != null) {
- SignalServiceAttachments = new ArrayList<>(attachments.size());
+ signalServiceAttachments = new ArrayList<>(attachments.size());
for (String attachment : attachments) {
try {
- SignalServiceAttachments.add(createAttachment(new File(attachment)));
+ signalServiceAttachments.add(createAttachment(new File(attachment)));
} catch (IOException e) {
throw new AttachmentInvalidException(attachment, e);
}
}
}
- return SignalServiceAttachments;
+ return signalServiceAttachments;
}
private static String getFileMimeType(File file) throws IOException {
Optional<byte[]> preview = Optional.absent();
Optional<String> caption = Optional.absent();
Optional<String> blurHash = Optional.absent();
- return new SignalServiceAttachmentStream(attachmentStream, mime, attachmentSize, Optional.of(attachmentFile.getName()), false, preview, 0, 0, caption, blurHash, null);
+ return new SignalServiceAttachmentStream(attachmentStream, mime, attachmentSize, Optional.of(attachmentFile.getName()), false, preview, 0, 0, caption, blurHash, null, null);
}
static StreamDetails createStreamDetailsFromFile(File file) throws IOException {