Relax validation to allow null reporting tokens.

This commit is contained in:
erik-signal
2023-02-22 11:06:51 -05:00
committed by GitHub
parent 11c93c5f53
commit 95237a22a9
3 changed files with 50 additions and 2 deletions

View File

@@ -639,7 +639,7 @@ public class MessageController {
// spam report token is optional, but if provided ensure it is valid base64.
final Optional<byte[]> maybeSpamReportToken =
spamReport != null ? Optional.of(spamReport.token()) : Optional.empty();
spamReport != null ? Optional.ofNullable(spamReport.token()) : Optional.empty();
reportMessageManager.report(sourceNumber, sourceAci, sourcePni, messageGuid, spamReporterUuid, maybeSpamReportToken, userAgent);