mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-14 19:56:29 +00:00
[AB-290] fixing showing wrong active warning count in warn decay notification
fixing un mute log failing to render in case the mute did not come from a message fixing notification failing with exception in case there were no warnings to decay
This commit is contained in:
@@ -62,6 +62,9 @@ public class UnMuteLog extends ServerContext {
|
||||
* @return A string containing an URL leading to the message where the mute was triggered
|
||||
*/
|
||||
public String getMessageUrl() {
|
||||
return MessageUtils.buildMessageUrl(this.mute.getServer().getId() ,this.getMute().getMutingChannel().getId(), this.mute.getMessageId());
|
||||
if(this.mute.getMessageId() != null && this.mute.getMutingChannel() != null) {
|
||||
return MessageUtils.buildMessageUrl(this.mute.getServer().getId(), this.mute.getMutingChannel().getId(), this.mute.getMessageId());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ public interface WarnManagementService {
|
||||
Warning createWarning(AUserInAServer warnedAUser, AUserInAServer warningAUser, String reason, Long warnId);
|
||||
List<Warning> getActiveWarningsInServerOlderThan(AServer server, Instant date);
|
||||
List<Warning> getActiveWarningsInServerYoungerThan(AServer server, Instant date);
|
||||
List<Warning> getActiveWarningsFromUserYoungerThan(AUserInAServer user, Instant date);
|
||||
Long getTotalWarnsForUser(AUserInAServer aUserInAServer);
|
||||
List<Warning> getAllWarnsForUser(AUserInAServer aUserInAServer);
|
||||
List<Warning> getAllWarningsOfServer(AServer server);
|
||||
|
||||
Reference in New Issue
Block a user