Fix comments in PrivateMessageValidator.

This commit is contained in:
akwizgran
2020-11-19 13:29:57 +00:00
parent b477962321
commit 228907543e

View File

@@ -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);