mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-04-15 20:16:34 +00:00
[AB-xxx] also stopping the triggers if a server poll is closed
This commit is contained in:
@@ -456,6 +456,12 @@ public class PollServiceBean implements PollService {
|
|||||||
.text(text)
|
.text(text)
|
||||||
.serverId(serverId)
|
.serverId(serverId)
|
||||||
.build();
|
.build();
|
||||||
|
if(poll.getReminderJobTriggerKey() != null) {
|
||||||
|
schedulerService.stopTrigger(poll.getReminderJobTriggerKey());
|
||||||
|
}
|
||||||
|
if(poll.getEvaluationJobTriggerKey() != null) {
|
||||||
|
schedulerService.stopTrigger(poll.getEvaluationJobTriggerKey());
|
||||||
|
}
|
||||||
MessageToSend messageToSend = templateService.renderEmbedTemplate(SERVER_POLL_CLOSE_MESSAGE, model);
|
MessageToSend messageToSend = templateService.renderEmbedTemplate(SERVER_POLL_CLOSE_MESSAGE, model);
|
||||||
List<CompletableFuture<Message>> messageFutures = postTargetService.sendEmbedInPostTarget(messageToSend, PollPostTarget.POLLS, serverId);
|
List<CompletableFuture<Message>> messageFutures = postTargetService.sendEmbedInPostTarget(messageToSend, PollPostTarget.POLLS, serverId);
|
||||||
MessageChannel channel = channelService.getMessageChannelFromServer(serverId, poll.getChannel().getId());
|
MessageChannel channel = channelService.getMessageChannelFromServer(serverId, poll.getChannel().getId());
|
||||||
|
|||||||
Reference in New Issue
Block a user