mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-03-27 14:23:56 +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.");
|
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
|
List<FileUpload> files = messageToSend
|
||||||
.getAttachedFiles()
|
.getAttachedFiles()
|
||||||
.stream()
|
.stream()
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ public class MessageToSend {
|
|||||||
/**
|
/**
|
||||||
* The file handle to send attached to the message.
|
* 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 MessageConfig messageConfig;
|
||||||
private Long referencedMessageId;
|
private Long referencedMessageId;
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
@@ -44,7 +45,7 @@ public class MessageToSend {
|
|||||||
private Boolean ephemeral = false;
|
private Boolean ephemeral = false;
|
||||||
|
|
||||||
public boolean hasFilesToSend() {
|
public boolean hasFilesToSend() {
|
||||||
return attachedFiles != null && !attachedFiles.isEmpty();
|
return !attachedFiles.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
|
|||||||
Reference in New Issue
Block a user