mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-20 05:28:05 +01:00
Add hooks so spam filters can register Dropwizard commands
This commit is contained in:
committed by
Jon Chambers
parent
4d5cc4dc22
commit
1ce1c298d3
@@ -355,6 +355,12 @@ public class WhisperServerService extends Application<WhisperServerConfiguration
|
||||
new IdleDeviceNotificationSchedulerFactory()));
|
||||
|
||||
bootstrap.addCommand(new RegenerateSecondaryDynamoDbTableDataCommand());
|
||||
|
||||
ServiceLoader.load(SpamFilter.class)
|
||||
.stream()
|
||||
.map(ServiceLoader.Provider::get)
|
||||
.flatMap(spamFilter -> spamFilter.getCommands().stream())
|
||||
.forEach(bootstrap::addCommand);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user