Fix sending large text messages to multiple recipients

Fixes #1177
This commit is contained in:
AsamK 2023-03-03 18:06:31 +01:00
parent 75d7270d5a
commit f1fd528483

View file

@ -569,7 +569,7 @@ class ManagerImpl implements Manager {
final var textAttachment = AttachmentUtils.createAttachmentStream(new StreamDetails(new ByteArrayInputStream(
messageBytes), MimeUtils.LONG_TEXT, messageBytes.length), Optional.empty());
messageBuilder.withBody(message.messageText().substring(0, 2000));
messageBuilder.withAttachment(textAttachment);
messageBuilder.withAttachment(context.getAttachmentHelper().uploadAttachment(textAttachment));
} else {
messageBuilder.withBody(message.messageText());
}