mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 20:59:54 +01:00
Fix comments in PrivateMessageValidator.
This commit is contained in:
@@ -102,7 +102,7 @@ class PrivateMessageValidator implements MessageValidator {
|
|||||||
|
|
||||||
private BdfMessageContext validateLegacyPrivateMessage(Message m,
|
private BdfMessageContext validateLegacyPrivateMessage(Message m,
|
||||||
BdfList body) throws FormatException {
|
BdfList body) throws FormatException {
|
||||||
// Private message text
|
// Client version 0.0: Private message text
|
||||||
checkSize(body, 1);
|
checkSize(body, 1);
|
||||||
String text = body.getString(0);
|
String text = body.getString(0);
|
||||||
checkLength(text, 0, MAX_PRIVATE_MESSAGE_TEXT_LENGTH);
|
checkLength(text, 0, MAX_PRIVATE_MESSAGE_TEXT_LENGTH);
|
||||||
@@ -116,9 +116,9 @@ class PrivateMessageValidator implements MessageValidator {
|
|||||||
|
|
||||||
private BdfMessageContext validatePrivateMessage(Message m, BdfList body)
|
private BdfMessageContext validatePrivateMessage(Message m, BdfList body)
|
||||||
throws FormatException {
|
throws FormatException {
|
||||||
// Version 0.1: Message type, optional private message text,
|
// Client version 0.1 to 0.2: Message type, optional private message
|
||||||
// attachment headers.
|
// text, attachment headers.
|
||||||
// Version 0.2: Message type, optional private message text,
|
// Client version 0.3: Message type, optional private message text,
|
||||||
// attachment headers, optional auto-delete timer.
|
// attachment headers, optional auto-delete timer.
|
||||||
checkSize(body, 3, 4);
|
checkSize(body, 3, 4);
|
||||||
String text = body.getOptionalString(1);
|
String text = body.getOptionalString(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user