changed catch block in join listener for Exception, so the listener dont interrupt one another

fixed join template
added join listener to check if a joined user should be muted
changed cached message to be an intant instead
fixed wrong id in mute table
moved the timestamps for mute notifications to the footer
fixed a case for message embeds, when the embed does not have a description
This commit is contained in:
Sheldan
2020-04-24 20:04:19 +02:00
parent b41a596acd
commit 0f8a39a336
15 changed files with 78 additions and 19 deletions

View File

@@ -35,6 +35,8 @@ public class Mute {
private Instant muteTargetDate;
private Boolean muteEnded;
@Column
private Long messageId;

View File

@@ -13,6 +13,7 @@ public interface MuteService {
Mute muteMember(Member memberToMute, Member userMuting, String reason, Instant unmuteDate, Message message);
Mute muteMember(AUserInAServer member, AUserInAServer userMuting, String reason, Instant unmuteDate, Message message);
Mute muteUser(FullUser userToMute, FullUser userMuting, String reason, Instant unmuteDate, Message message);
void applyMuteRole(AUserInAServer aUserInAServer);
void muteMemberWithLog(Member memberToMute, Member memberMuting, String reason, Instant unmuteDate, MuteLog log, Message message);
void startUnmuteJobFor(Instant unmuteDate, Mute mute);
void unmuteUser(Mute mute);

View File

@@ -9,4 +9,6 @@ import java.time.Instant;
public interface MuteManagementService {
Mute createMute(AUserInAServer aUserInAServer, AUserInAServer mutingUser, String reason, Instant unmuteDate, AServerAChannelMessage creation);
Mute findMute(Long muteId);
Mute saveMute(Mute mute);
boolean hasActiveMute(AUserInAServer userInAServer);
}