mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-03 08:19:54 +00:00
[AB-xxx] setting duration to zero if it was not provided, for infraction storage
This commit is contained in:
@@ -88,6 +88,9 @@ public class BanServiceBean implements BanService {
|
||||
AUserInAServer bannedUser = userInServerManagementService.loadOrCreateUser(guild.getIdLong(), user.getIdLong());
|
||||
AUserInAServer banningUser = userInServerManagementService.loadOrCreateUser(banningMember);
|
||||
Map<String, String> parameters = new HashMap<>();
|
||||
if(deletionDuration == null) {
|
||||
deletionDuration = Duration.ZERO;
|
||||
}
|
||||
parameters.put(INFRACTION_PARAMETER_DELETION_DURATION_KEY, deletionDuration.toString());
|
||||
return infractionService.createInfractionWithNotification(bannedUser, infractionPoints, BAN_INFRACTION_TYPE, reason, banningUser, parameters, banLogMessage)
|
||||
.thenApply(Infraction::getId);
|
||||
|
||||
Reference in New Issue
Block a user