mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Refactor attachment upload
This commit is contained in:
parent
7f1fc932ad
commit
91eacc18c2
1 changed files with 3 additions and 2 deletions
|
@ -764,11 +764,12 @@ public class ManagerImpl implements Manager {
|
||||||
messageBuilder.withBody(message.messageText());
|
messageBuilder.withBody(message.messageText());
|
||||||
}
|
}
|
||||||
if (!message.attachments().isEmpty()) {
|
if (!message.attachments().isEmpty()) {
|
||||||
|
final var uploadedAttachments = context.getAttachmentHelper().uploadAttachments(message.attachments());
|
||||||
if (!additionalAttachments.isEmpty()) {
|
if (!additionalAttachments.isEmpty()) {
|
||||||
additionalAttachments.addAll(context.getAttachmentHelper().uploadAttachments(message.attachments()));
|
additionalAttachments.addAll(uploadedAttachments);
|
||||||
messageBuilder.withAttachments(additionalAttachments);
|
messageBuilder.withAttachments(additionalAttachments);
|
||||||
} else {
|
} else {
|
||||||
messageBuilder.withAttachments(context.getAttachmentHelper().uploadAttachments(message.attachments()));
|
messageBuilder.withAttachments(uploadedAttachments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!message.mentions().isEmpty()) {
|
if (!message.mentions().isEmpty()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue