mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 21:29:54 +01:00
Truncate all messages to valid length before sending.
This commit is contained in:
@@ -484,10 +484,7 @@ class FeedManagerImpl implements FeedManager, Client, EventListener {
|
||||
|
||||
private String getPostBody(String text) {
|
||||
text = clean(text, article);
|
||||
byte[] textBytes = StringUtils.toUtf8(text);
|
||||
if (textBytes.length <= MAX_BLOG_POST_BODY_LENGTH)
|
||||
return text;
|
||||
return StringUtils.fromUtf8(textBytes, 0, MAX_BLOG_POST_BODY_LENGTH);
|
||||
return StringUtils.truncateUtf8(text, MAX_BLOG_POST_BODY_LENGTH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user