mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-14 18:37:58 +00:00
[AB-93] fixing not initializing the attached files
This commit is contained in:
@@ -342,7 +342,7 @@ public class ChannelServiceBean implements ChannelService {
|
||||
throw new IllegalArgumentException("Message to send did not contain anything to send.");
|
||||
}
|
||||
}
|
||||
if(messageToSend.getAttachedFiles() != null && !messageToSend.getAttachedFiles().isEmpty()) {
|
||||
if(!messageToSend.getAttachedFiles().isEmpty()) {
|
||||
List<FileUpload> files = messageToSend
|
||||
.getAttachedFiles()
|
||||
.stream()
|
||||
|
||||
@@ -32,7 +32,8 @@ public class MessageToSend {
|
||||
/**
|
||||
* The file handle to send attached to the message.
|
||||
*/
|
||||
private List<AttachedFile> attachedFiles;
|
||||
@Builder.Default
|
||||
private List<AttachedFile> attachedFiles = new ArrayList<>();
|
||||
private MessageConfig messageConfig;
|
||||
private Long referencedMessageId;
|
||||
@Builder.Default
|
||||
@@ -44,7 +45,7 @@ public class MessageToSend {
|
||||
private Boolean ephemeral = false;
|
||||
|
||||
public boolean hasFilesToSend() {
|
||||
return attachedFiles != null && !attachedFiles.isEmpty();
|
||||
return !attachedFiles.isEmpty();
|
||||
}
|
||||
|
||||
@Getter
|
||||
|
||||
Reference in New Issue
Block a user