mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-14 11:48:16 +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());
|
||||
|
||||
@@ -3,13 +3,12 @@
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>dev.sheldan.abstracto</groupId>
|
||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||
<artifactId>abstracto-modules</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||
<artifactId>modmail</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user