mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-26 13:46:19 +00:00
[AB-80] added tracking of emotes used by server members and configuration
updated sonar scanner version changed some commands to be silent instead of adding a check reaction
This commit is contained in:
@@ -49,7 +49,7 @@ public class Close extends AbstractConditionableCommand {
|
||||
String note = parameters.size() == 1 ? (String) parameters.get(0) : templateService.renderTemplate("modmail_close_default_note", new Object());
|
||||
ModMailThread thread = modMailThreadManagementService.getByChannel(commandContext.getUserInitiatedContext().getChannel());
|
||||
return modMailThreadService.closeModMailThread(thread, note, true, commandContext.getUndoActions(), true)
|
||||
.thenApply(aVoid -> CommandResult.fromSuccess());
|
||||
.thenApply(aVoid -> CommandResult.fromIgnored());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,7 +47,7 @@ public class CloseNoLog extends AbstractConditionableCommand {
|
||||
ModMailThread thread = modMailThreadManagementService.getByChannel(commandContext.getUserInitiatedContext().getChannel());
|
||||
// we don't have a note, therefore we cant pass any, the method handles this accordingly
|
||||
return modMailThreadService.closeModMailThread(thread, null, false, commandContext.getUndoActions(), false)
|
||||
.thenApply(aVoid -> CommandResult.fromSuccess());
|
||||
.thenApply(aVoid -> CommandResult.fromIgnored());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@ public class CloseSilently extends AbstractConditionableCommand {
|
||||
String note = parameters.size() == 1 ? (String) parameters.get(0) : templateService.renderTemplate("modmail_close_default_note", new Object());
|
||||
ModMailThread thread = modMailThreadManagementService.getByChannel(commandContext.getUserInitiatedContext().getChannel());
|
||||
return modMailThreadService.closeModMailThread(thread, note, false, commandContext.getUndoActions(), true)
|
||||
.thenApply(aVoid -> CommandResult.fromSuccess());
|
||||
.thenApply(aVoid -> CommandResult.fromIgnored());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Contact extends AbstractConditionableCommand {
|
||||
ModMailThread existingThread = modMailThreadManagementService.getOpenModMailThreadForUser(user);
|
||||
model.setExistingModMailThread(existingThread);
|
||||
List<CompletableFuture<Message>> futures = channelService.sendEmbedTemplateInChannel("modmail_thread_already_exists", model, commandContext.getChannel());
|
||||
return FutureUtils.toSingleFutureGeneric(futures).thenApply(aVoid -> CommandResult.fromSuccess());
|
||||
return FutureUtils.toSingleFutureGeneric(futures).thenApply(aVoid -> CommandResult.fromIgnored());
|
||||
} else {
|
||||
return modMailThreadService.createModMailThreadForUser(targetUser, null, commandContext.getChannel(), false, commandContext.getUndoActions())
|
||||
.thenApply(aVoid -> CommandResult.fromSuccess());
|
||||
|
||||
Reference in New Issue
Block a user