Pass AccountAndAuthenticatedDeviceHolder to spam filter
This commit is contained in:
parent
f52c40a492
commit
ec009a2bba
|
@ -327,7 +327,7 @@ public class MessageController {
|
|||
|
||||
final Optional<byte[]> spamReportToken = switch (senderType) {
|
||||
case SENDER_TYPE_IDENTIFIED ->
|
||||
reportSpamTokenProvider.makeReportSpamToken(context, source.get().getAccount(), destination);
|
||||
reportSpamTokenProvider.makeReportSpamToken(context, source.get(), destination);
|
||||
default -> Optional.empty();
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package org.whispersystems.textsecuregcm.spam;
|
||||
|
||||
import org.whispersystems.textsecuregcm.auth.AccountAndAuthenticatedDeviceHolder;
|
||||
import org.whispersystems.textsecuregcm.storage.Account;
|
||||
import javax.ws.rs.container.ContainerRequestContext;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Function;
|
||||
|
||||
/**
|
||||
* Generates ReportSpamTokens to be used for spam reports.
|
||||
|
@ -18,7 +18,7 @@ public interface ReportSpamTokenProvider {
|
|||
* @param maybeDestination the intended recepient of the message if available
|
||||
* @return either a generated token or nothing
|
||||
*/
|
||||
Optional<byte[]> makeReportSpamToken(ContainerRequestContext context, final Account sender,
|
||||
Optional<byte[]> makeReportSpamToken(ContainerRequestContext context, final AccountAndAuthenticatedDeviceHolder sender,
|
||||
final Optional<Account> maybeDestination);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue