Compare commits

...

27 Commits

Author SHA1 Message Date
Sheldan
79ad590eff [SIS-xxx] fixing abstracto version 2026-04-24 20:03:47 +02:00
Sheldan
d5d6bbbcb5 [SIS-xxx] changing ban message
modifying meetup to add the location on the meetup message itself
updating abstracto version
2026-04-24 20:03:10 +02:00
release-bot
796c66ff33 Commit from GitHub Actions (Publishes a new version of Sissi) 2026-03-29 10:42:08 +00:00
release-bot
322ff139f1 [maven-release-plugin] prepare for next development iteration 2026-03-29 10:36:19 +00:00
release-bot
b26a62b04a [maven-release-plugin] prepare release sissi-1.5.22 2026-03-29 10:36:17 +00:00
Sheldan
56ca9c7837 [SIS-xxx] updating abstracto version to get new features 2026-03-29 12:31:57 +02:00
release-bot
cb7a8b04d8 Commit from GitHub Actions (Publishes a new version of Sissi) 2026-02-15 22:24:24 +00:00
release-bot
4c9ba0a7f8 [maven-release-plugin] prepare for next development iteration 2026-02-15 22:16:54 +00:00
release-bot
ca47422b35 [maven-release-plugin] prepare release sissi-1.5.21 2026-02-15 22:16:51 +00:00
Sheldan
aa1ffc7ce0 [SIS-xxx] updating abstracto to get @time duration handling
adding instant parsing ability for meetup parameter
remove change meetup time text command
removing not needed method
2026-02-15 23:11:31 +01:00
Sheldan
82378e3f5e [SIS-xxx] updating grafana dashboards
adding http request panel
updating abstracto versions to get http metric and remind hint text
2026-01-08 00:40:29 +01:00
release-bot
ca05ce4abf Commit from GitHub Actions (Publishes a new version of Sissi) 2025-12-30 12:52:27 +00:00
release-bot
26663f9f00 [maven-release-plugin] prepare for next development iteration 2025-12-30 12:46:38 +00:00
release-bot
128710c847 [maven-release-plugin] prepare release sissi-1.5.20 2025-12-30 12:46:36 +00:00
Sheldan
ee0a49b00e [SIS-xxx] updating abstracto version to get the new JDA version 2025-12-30 13:42:08 +01:00
Sheldan
ff4756e0ff [SIS-xxx] updating abstracto version to get the new JDA version 2025-12-28 21:24:59 +01:00
release-bot
68e4dc4235 Commit from GitHub Actions (Publishes a new version of Sissi) 2025-12-17 23:23:15 +00:00
release-bot
7d827c6e1e [maven-release-plugin] prepare for next development iteration 2025-12-17 23:17:19 +00:00
release-bot
8e292f76e4 [maven-release-plugin] prepare release sissi-1.5.19 2025-12-17 23:17:18 +00:00
Sheldan
a2db56853b [SIS-xxx] updating abstracto version to get capability to use multiple channels for a post target
updating donation notification to use two templates for the post target
removing separate donation notification post target in favor of multiple channels
removing attribution as the code was refactored and reworked
2025-12-18 00:05:39 +01:00
release-bot
abcd8e5c67 Commit from GitHub Actions (Publishes a new version of Sissi) 2025-12-14 20:56:58 +00:00
release-bot
a05b9a8811 [maven-release-plugin] prepare for next development iteration 2025-12-14 20:50:19 +00:00
release-bot
ec5a07cffb [maven-release-plugin] prepare release sissi-1.5.18 2025-12-14 20:50:18 +00:00
Sheldan
111a88b091 [SIS-xxx] changing meetup display to use display names instead of mentions
fixing not showing organizer if no description was yet
2025-12-14 21:40:34 +01:00
release-bot
663d88475a Commit from GitHub Actions (Publishes a new version of Sissi) 2025-12-07 12:52:54 +00:00
release-bot
8336d7fd9e [maven-release-plugin] prepare for next development iteration 2025-12-07 12:46:21 +00:00
release-bot
a5d3b970df [maven-release-plugin] prepare release sissi-1.5.17 2025-12-07 12:46:20 +00:00
72 changed files with 523 additions and 271 deletions

4
.env
View File

@@ -1,4 +1,4 @@
REGISTRY_PREFIX=harbor.sheldan.dev/sissi/ REGISTRY_PREFIX=harbor.sheldan.dev/sissi/
ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/ ABSTRACTO_PREFIX=harbor.sheldan.dev/abstracto/
VERSION=1.5.16 VERSION=1.5.22
ABSTRACTO_VERSION=1.6.17 ABSTRACTO_VERSION=1.6.22

3
README
View File

@@ -1,4 +1 @@
Attributions:
Code for debra module has been inspired with approval of zinnsoldat91 by: https://github.com/zinnsoldat91/spendenbot. The code has been adapted to fit into the structure.

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.application</groupId> <groupId>dev.sheldan.sissi.application</groupId>
<artifactId>application</artifactId> <artifactId>application</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>executable</artifactId> <artifactId>executable</artifactId>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi</groupId> <groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId> <artifactId>sissi</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.application.module.custom</groupId> <groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>sissi-customizations</artifactId> <artifactId>sissi-customizations</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<artifactId>image-generation-custom</artifactId> <artifactId>image-generation-custom</artifactId>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.application.module.custom</groupId> <groupId>dev.sheldan.sissi.application.module.custom</groupId>
<artifactId>sissi-customizations</artifactId> <artifactId>sissi-customizations</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>application</artifactId> <artifactId>application</artifactId>
<groupId>dev.sheldan.sissi.application</groupId> <groupId>dev.sheldan.sissi.application</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.application</groupId> <groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId> <artifactId>sissi-modules</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -21,7 +21,7 @@ public class DebraFeatureConfig implements FeatureConfig {
@Override @Override
public List<PostTargetEnum> getRequiredPostTargets() { public List<PostTargetEnum> getRequiredPostTargets() {
return Arrays.asList(DebraPostTarget.DEBRA_DONATION_NOTIFICATION, DebraPostTarget.DEBRA_DONATION_NOTIFICATION2); return Arrays.asList(DebraPostTarget.DEBRA_DONATION_NOTIFICATION);
} }
@Override @Override

View File

@@ -5,7 +5,7 @@ import lombok.Getter;
@Getter @Getter
public enum DebraPostTarget implements PostTargetEnum { public enum DebraPostTarget implements PostTargetEnum {
DEBRA_DONATION_NOTIFICATION("debraDonationNotification"), DEBRA_DONATION_NOTIFICATION2("debraDonationNotification2"); DEBRA_DONATION_NOTIFICATION("debraDonationNotification");
private String key; private String key;

View File

@@ -87,6 +87,7 @@ public class DonationService {
private DonationService self; private DonationService self;
private static final String DEBRA_DONATION_NOTIFICATION_TEMPLATE_KEY = "debra_donation_notification"; private static final String DEBRA_DONATION_NOTIFICATION_TEMPLATE_KEY = "debra_donation_notification";
private static final String DEBRA_DONATION_PING_NOTIFICATION_TEMPLATE_KEY = "debra_donation_notification_ping_notification";
private static final String DEBRA_INFO_BUTTON_MESSAGE_TEMPLATE_KEY = "debraInfoButton"; private static final String DEBRA_INFO_BUTTON_MESSAGE_TEMPLATE_KEY = "debraInfoButton";
public static final String DEBRA_INFO_BUTTON_ORIGIN = "DEBRA_INFO_BUTTON"; public static final String DEBRA_INFO_BUTTON_ORIGIN = "DEBRA_INFO_BUTTON";
@@ -286,10 +287,9 @@ public class DonationService {
.totalDonationAmount(donationInfoModel.getTotalAmount()) .totalDonationAmount(donationInfoModel.getTotalAmount())
.build(); .build();
MessageToSend messageToSend = templateService.renderEmbedTemplate(DEBRA_DONATION_NOTIFICATION_TEMPLATE_KEY, model, targetServerId); MessageToSend messageToSend = templateService.renderEmbedTemplate(DEBRA_DONATION_NOTIFICATION_TEMPLATE_KEY, model, targetServerId);
List<CompletableFuture<Message>> firstMessage = postTargetService.sendEmbedInPostTarget(messageToSend, DebraPostTarget.DEBRA_DONATION_NOTIFICATION, targetServerId); MessageToSend pingMessageToSend = templateService.renderEmbedTemplate(DEBRA_DONATION_PING_NOTIFICATION_TEMPLATE_KEY, model, targetServerId);
List<CompletableFuture<Message>> secondMessage = postTargetService.sendEmbedInPostTarget(messageToSend, DebraPostTarget.DEBRA_DONATION_NOTIFICATION2, targetServerId); return FutureUtils.toSingleFutureGenericList(postTargetService.sendEmbedInPostTarget(List.of(pingMessageToSend, messageToSend),
firstMessage.addAll(secondMessage); DebraPostTarget.DEBRA_DONATION_NOTIFICATION, targetServerId));
return FutureUtils.toSingleFutureGeneric(firstMessage);
} }
public CompletableFuture<Void> sendDebraInfoButtonMessage(GuildMessageChannel guildMessageChannel) { public CompletableFuture<Void> sendDebraInfoButtonMessage(GuildMessageChannel guildMessageChannel) {

View File

@@ -2,7 +2,6 @@ abstracto.featureFlags.debra.featureName=debra
abstracto.featureFlags.debra.enabled=false abstracto.featureFlags.debra.enabled=false
abstracto.postTargets.debraDonationNotification.name=debraDonationNotification abstracto.postTargets.debraDonationNotification.name=debraDonationNotification
abstracto.postTargets.debraDonationNotification2.name=debraDonationNotification2
sissi.debra.donationPageUrl=https://secure.sicherhelfen.org/campaigns/07a3baf6-5cdc-4300-854b-ea2b36b0b218/show sissi.debra.donationPageUrl=https://secure.sicherhelfen.org/campaigns/07a3baf6-5cdc-4300-854b-ea2b36b0b218/show

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.application</groupId> <groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId> <artifactId>sissi-modules</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -5,7 +5,6 @@ import dev.sheldan.abstracto.core.command.condition.AbstractConditionableCommand
import dev.sheldan.abstracto.core.command.config.CommandConfiguration; import dev.sheldan.abstracto.core.command.config.CommandConfiguration;
import dev.sheldan.abstracto.core.command.config.HelpInfo; import dev.sheldan.abstracto.core.command.config.HelpInfo;
import dev.sheldan.abstracto.core.command.config.Parameter; import dev.sheldan.abstracto.core.command.config.Parameter;
import dev.sheldan.abstracto.core.command.execution.CommandContext;
import dev.sheldan.abstracto.core.command.execution.CommandResult; import dev.sheldan.abstracto.core.command.execution.CommandResult;
import dev.sheldan.abstracto.core.config.FeatureDefinition; import dev.sheldan.abstracto.core.config.FeatureDefinition;
import dev.sheldan.abstracto.core.interaction.ComponentService; import dev.sheldan.abstracto.core.interaction.ComponentService;
@@ -13,10 +12,7 @@ import dev.sheldan.abstracto.core.interaction.InteractionService;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig; import dev.sheldan.abstracto.core.interaction.slash.SlashCommandConfig;
import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels; import dev.sheldan.abstracto.core.interaction.slash.SlashCommandPrivilegeLevels;
import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService; import dev.sheldan.abstracto.core.interaction.slash.parameter.SlashCommandParameterService;
import dev.sheldan.abstracto.core.service.ChannelService; import dev.sheldan.abstracto.core.utils.ParseUtils;
import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition; import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition;
import dev.sheldan.sissi.module.meetup.config.MeetupSlashCommandNames; import dev.sheldan.sissi.module.meetup.config.MeetupSlashCommandNames;
import dev.sheldan.sissi.module.meetup.exception.MeetupPastTimeException; import dev.sheldan.sissi.module.meetup.exception.MeetupPastTimeException;
@@ -57,44 +53,6 @@ public class ChangeMeetupTime extends AbstractConditionableCommand {
@Autowired @Autowired
private MeetupServiceBean meetupServiceBean; private MeetupServiceBean meetupServiceBean;
@Autowired
private ChannelService channelService;
@Autowired
private TemplateService templateService;
@Override
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
List<Object> parameters = commandContext.getParameters().getParameters();
Long meetupId = (Long) parameters.get(0);
Meetup meetup = meetupManagementServiceBean.getMeetup(meetupId, commandContext.getGuild().getIdLong());
if(!meetup.getOrganizer().getUserReference().getId().equals(commandContext.getAuthor().getIdLong())) {
throw new NotMeetupOrganizerException();
}
Long newTimestamp = (Long) parameters.get(1);
Instant newMeetupTime = Instant.ofEpochSecond(newTimestamp);
if(newMeetupTime.isBefore(Instant.now())) {
throw new MeetupPastTimeException();
}
String confirmationId = componentService.generateComponentId();
String cancelId = componentService.generateComponentId();
MeetupChangeTimeConfirmationModel model = MeetupChangeTimeConfirmationModel
.builder()
.meetupTime(newMeetupTime)
.topic(meetup.getTopic())
.description(meetup.getDescription())
.userId(commandContext.getAuthor().getIdLong())
.guildId(commandContext.getGuild().getIdLong())
.meetupId(meetupId)
.confirmationId(confirmationId)
.cancelId(cancelId)
.build();
MessageToSend messageToSend = templateService.renderEmbedTemplate(CHANGE_MEETUP_TIME_CONFIRMATION, model, commandContext.getGuild().getIdLong());
return FutureUtils.toSingleFutureGeneric(channelService.sendMessageToSendToChannel(messageToSend, commandContext.getChannel()))
.thenAccept(unused -> meetupServiceBean.storeMeetupChangeTimeConfirmation(model))
.thenApply(unused -> CommandResult.fromSuccess());
}
@Override @Override
public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) { public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) {
Long meetupId = slashCommandParameterService.getCommandOption(MEETUP_ID_PARAMETER, event, Integer.class).longValue(); Long meetupId = slashCommandParameterService.getCommandOption(MEETUP_ID_PARAMETER, event, Integer.class).longValue();
@@ -102,8 +60,8 @@ public class ChangeMeetupTime extends AbstractConditionableCommand {
if(!meetup.getOrganizer().getUserReference().getId().equals(event.getMember().getIdLong())) { if(!meetup.getOrganizer().getUserReference().getId().equals(event.getMember().getIdLong())) {
throw new NotMeetupOrganizerException(); throw new NotMeetupOrganizerException();
} }
Integer time = slashCommandParameterService.getCommandOption(MEETUP_NEW_TIMESTAMP_PARAMETER, event, Long.class, Integer.class); String time = slashCommandParameterService.getCommandOption(MEETUP_NEW_TIMESTAMP_PARAMETER, event, String.class, String.class);
Instant meetupTime = Instant.ofEpochSecond(time); Instant meetupTime = ParseUtils.parseInstant(time);
if(meetupTime.isBefore(Instant.now())) { if(meetupTime.isBefore(Instant.now())) {
throw new MeetupPastTimeException(); throw new MeetupPastTimeException();
} }
@@ -138,7 +96,7 @@ public class ChangeMeetupTime extends AbstractConditionableCommand {
.builder() .builder()
.templated(true) .templated(true)
.name(MEETUP_NEW_TIMESTAMP_PARAMETER) .name(MEETUP_NEW_TIMESTAMP_PARAMETER)
.type(Long.class) .type(Instant.class)
.build(); .build();
List<Parameter> parameters = Arrays.asList(meetupIdParameter, newTimeStampParameter); List<Parameter> parameters = Arrays.asList(meetupIdParameter, newTimeStampParameter);
@@ -162,6 +120,7 @@ public class ChangeMeetupTime extends AbstractConditionableCommand {
.async(true) .async(true)
.slashCommandConfig(slashCommandConfig) .slashCommandConfig(slashCommandConfig)
.supportsEmbedException(true) .supportsEmbedException(true)
.slashCommandOnly(true)
.causesReaction(true) .causesReaction(true)
.parameters(parameters) .parameters(parameters)
.help(helpInfo) .help(helpInfo)

View File

@@ -23,6 +23,7 @@ import dev.sheldan.abstracto.core.service.management.UserInServerManagementServi
import dev.sheldan.abstracto.core.templating.model.MessageToSend; import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService; import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.FutureUtils; import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.abstracto.core.utils.ParseUtils;
import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition; import dev.sheldan.sissi.module.meetup.config.MeetupFeatureDefinition;
import dev.sheldan.sissi.module.meetup.config.MeetupSlashCommandNames; import dev.sheldan.sissi.module.meetup.config.MeetupSlashCommandNames;
import dev.sheldan.sissi.module.meetup.model.command.MeetupConfirmationModel; import dev.sheldan.sissi.module.meetup.model.command.MeetupConfirmationModel;
@@ -34,6 +35,8 @@ import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEve
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.time.Instant; import java.time.Instant;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
@@ -75,7 +78,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
private static final String DESCRIPTION_PARAMETER = "description"; private static final String DESCRIPTION_PARAMETER = "description";
private static final String LOCATION_PARAMETER = "location"; private static final String LOCATION_PARAMETER = "location";
private static final String CONFIRMATION_TEMPLATE = "createMeetup_confirmation"; private static final String CONFIRMATION_TEMPLATE = "createMeetup_confirmation";
private static final String DEFAULT_LOCATION_STRING = "\"\""; private static final String DEFAULT_LOCATION_STRING = "";
@Override @Override
public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) { public CompletableFuture<CommandResult> executeAsync(CommandContext commandContext) {
@@ -93,13 +96,14 @@ public class CreateMeetup extends AbstractConditionableCommand {
Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, meetupTopic, description, organizer, meetupChannel, DEFAULT_LOCATION_STRING); Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, meetupTopic, description, organizer, meetupChannel, DEFAULT_LOCATION_STRING);
String confirmationId = componentService.generateComponentId(); String confirmationId = componentService.generateComponentId();
String cancelId = componentService.generateComponentId(); String cancelId = componentService.generateComponentId();
String locationEncoded = URLEncoder.encode(meetup.getLocation(), StandardCharsets.UTF_8);
MeetupConfirmationModel model = MeetupConfirmationModel MeetupConfirmationModel model = MeetupConfirmationModel
.builder() .builder()
.meetupTime(meetupTime) .meetupTime(meetupTime)
.guildId(commandContext.getGuild().getIdLong()) .guildId(commandContext.getGuild().getIdLong())
.description(description) .description(description)
.topic(meetupTopic) .topic(meetupTopic)
.location(meetup.getLocation()) .location(locationEncoded)
.confirmationId(confirmationId) .confirmationId(confirmationId)
.cancelId(cancelId) .cancelId(cancelId)
.meetupId(meetup.getId().getId()) .meetupId(meetup.getId().getId())
@@ -114,7 +118,7 @@ public class CreateMeetup extends AbstractConditionableCommand {
@Override @Override
public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) { public CompletableFuture<CommandResult> executeSlash(SlashCommandInteractionEvent event) {
Integer time = slashCommandParameterService.getCommandOption(MEETUP_TIME_PARAMETER, event, Long.class, Integer.class); String time = slashCommandParameterService.getCommandOption(MEETUP_TIME_PARAMETER, event, Instant.class, String.class);
String topic = slashCommandParameterService.getCommandOption(TOPIC_PARAMETER, event, String.class); String topic = slashCommandParameterService.getCommandOption(TOPIC_PARAMETER, event, String.class);
String description; String description;
if(slashCommandParameterService.hasCommandOption(DESCRIPTION_PARAMETER, event)) { if(slashCommandParameterService.hasCommandOption(DESCRIPTION_PARAMETER, event)) {
@@ -129,19 +133,20 @@ public class CreateMeetup extends AbstractConditionableCommand {
} else { } else {
location = DEFAULT_LOCATION_STRING; location = DEFAULT_LOCATION_STRING;
} }
Instant meetupTime = Instant.ofEpochSecond(time); Instant meetupTime = ParseUtils.parseInstant(time);
AUserInAServer organizer = userInServerManagementService.loadOrCreateUser(event.getMember()); AUserInAServer organizer = userInServerManagementService.loadOrCreateUser(event.getMember());
AChannel meetupChannel = channelManagementService.loadChannel(event.getChannel().getIdLong()); AChannel meetupChannel = channelManagementService.loadChannel(event.getChannel().getIdLong());
Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, topic, description, organizer, meetupChannel, location); Meetup meetup = meetupManagementServiceBean.createMeetup(meetupTime, topic, description, organizer, meetupChannel, location);
String confirmationId = componentService.generateComponentId(); String confirmationId = componentService.generateComponentId();
String cancelId = componentService.generateComponentId(); String cancelId = componentService.generateComponentId();
String locationEncoded = URLEncoder.encode(meetup.getLocation(), StandardCharsets.UTF_8);
MeetupConfirmationModel model = MeetupConfirmationModel MeetupConfirmationModel model = MeetupConfirmationModel
.builder() .builder()
.meetupTime(meetupTime) .meetupTime(meetupTime)
.guildId(event.getGuild().getIdLong()) .guildId(event.getGuild().getIdLong())
.description(description) .description(description)
.topic(topic) .topic(topic)
.location(meetup.getLocation()) .location(locationEncoded)
.confirmationId(confirmationId) .confirmationId(confirmationId)
.cancelId(cancelId) .cancelId(cancelId)
.meetupId(meetup.getId().getId()) .meetupId(meetup.getId().getId())

View File

@@ -42,7 +42,14 @@ public class MeetupChangeTimeConfirmationListener implements ButtonClickedListen
} }
if(model.getEvent().getComponentId().equals(payload.getConfirmationId())) { if(model.getEvent().getComponentId().equals(payload.getConfirmationId())) {
Meetup meetup = meetupManagementServiceBean.getMeetup(payload.getMeetupId(), payload.getGuildId()); Meetup meetup = meetupManagementServiceBean.getMeetup(payload.getMeetupId(), payload.getGuildId());
meetupServiceBean.changeMeetupTimeAndNotifyParticipants(meetup, Instant.ofEpochSecond(payload.getNewTime())); Long meetupId = meetup.getId().getId();
Long serverId = meetup.getId().getServerId();
meetupServiceBean.changeMeetupTimeAndNotifyParticipants(meetup, Instant.ofEpochSecond(payload.getNewTime())).thenAccept(unused -> {
log.info("Successfully changed time of meetup {} in server {}.", meetupId, serverId);
}).exceptionally(throwable -> {
log.error("Failed to update time of meetup {} in server {}.", meetupId, serverId);
return null;
});
messageService.deleteMessage(model.getEvent().getMessage()); messageService.deleteMessage(model.getEvent().getMessage());
cleanupConfirmationMessagePayloads(payload); cleanupConfirmationMessagePayloads(payload);
} else if(model.getEvent().getComponentId().equals(payload.getCancelId())) { } else if(model.getEvent().getComponentId().equals(payload.getCancelId())) {

View File

@@ -103,18 +103,26 @@ public class MeetupConfirmationListener implements ButtonClickedListener {
String noButtonId = componentService.generateComponentId(); String noButtonId = componentService.generateComponentId();
String maybeButtonId = componentService.generateComponentId(); String maybeButtonId = componentService.generateComponentId();
String noTimeButtonId = componentService.generateComponentId(); String noTimeButtonId = componentService.generateComponentId();
MeetupMessageModel messageModel = meetupServiceBean.getMeetupMessageModel(meetup); Long meetupId = payload.getMeetupId();
messageModel.setYesId(yesButtonId); Long serverId = payload.getGuildId();
messageModel.setNoId(noButtonId);
messageModel.setMaybeId(maybeButtonId);
messageModel.setNoTimeId(noTimeButtonId);
meetup.setYesButtonId(yesButtonId); meetup.setYesButtonId(yesButtonId);
meetup.setMaybeButtonId(maybeButtonId); meetup.setMaybeButtonId(maybeButtonId);
meetup.setNoTimeButtonId(noTimeButtonId); meetup.setNoTimeButtonId(noTimeButtonId);
meetup.setNotInterestedButtonId(noButtonId); meetup.setNotInterestedButtonId(noButtonId);
meetupServiceBean.getMeetupMessageModel(meetup).thenAccept(messageModel -> {
self.postMeetupMessage(model, messageModel, yesButtonId, noButtonId, maybeButtonId, noTimeButtonId, meetupId, serverId);
});
return ButtonClickedListenerResult.ACKNOWLEDGED;
}
@Transactional
public void postMeetupMessage(ButtonClickedListenerModel model, MeetupMessageModel messageModel, String yesButtonId, String noButtonId,
String maybeButtonId, String noTimeButtonId, Long meetupId, Long serverId) {
messageModel.setYesId(yesButtonId);
messageModel.setNoId(noButtonId);
messageModel.setMaybeId(maybeButtonId);
messageModel.setNoTimeId(noTimeButtonId);
messageModel.setCancelled(false); messageModel.setCancelled(false);
Long meetupId = payload.getMeetupId();
Long serverId = payload.getGuildId();
MessageToSend messageToSend = meetupServiceBean.getMeetupMessage(messageModel, model.getServerId()); MessageToSend messageToSend = meetupServiceBean.getMeetupMessage(messageModel, model.getServerId());
List<CompletableFuture<Message>> messageFutures = channelService.sendMessageToSendToChannel(messageToSend, model.getEvent().getMessageChannel()); List<CompletableFuture<Message>> messageFutures = channelService.sendMessageToSendToChannel(messageToSend, model.getEvent().getMessageChannel());
FutureUtils.toSingleFutureGeneric(messageFutures).thenAccept(unused -> { FutureUtils.toSingleFutureGeneric(messageFutures).thenAccept(unused -> {
@@ -129,7 +137,6 @@ public class MeetupConfirmationListener implements ButtonClickedListener {
log.error("Failed to send meetup message for meetup {}.", meetupId, throwable); log.error("Failed to send meetup message for meetup {}.", meetupId, throwable);
return null; return null;
}); });
return ButtonClickedListenerResult.ACKNOWLEDGED;
} }
private void cleanupConfirmationMessagePayloads(MeetupConfirmationPayload payload) { private void cleanupConfirmationMessagePayloads(MeetupConfirmationPayload payload) {

View File

@@ -20,8 +20,10 @@ import dev.sheldan.sissi.module.meetup.service.MeetupServiceBean;
import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean; import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean;
import dev.sheldan.sissi.module.meetup.service.management.MeetupParticipatorManagementServiceBean; import dev.sheldan.sissi.module.meetup.service.management.MeetupParticipatorManagementServiceBean;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.dv8tion.jda.api.entities.Member;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
@@ -45,11 +47,15 @@ public class MeetupDecisionListener implements ButtonClickedListener {
@Autowired @Autowired
private ChannelService channelService; private ChannelService channelService;
@Autowired
private MeetupDecisionListener self;
@Override @Override
public ButtonClickedListenerResult execute(ButtonClickedListenerModel model) { public ButtonClickedListenerResult execute(ButtonClickedListenerModel model) {
MeetupDecisionPayload payload = (MeetupDecisionPayload) model.getDeserializedPayload(); MeetupDecisionPayload payload = (MeetupDecisionPayload) model.getDeserializedPayload();
Meetup meetup = meetupManagementServiceBean.getMeetup(payload.getMeetupId(), payload.getGuildId()); Meetup meetup = meetupManagementServiceBean.getMeetup(payload.getMeetupId(), payload.getGuildId());
AUserInAServer userInAServer = userInServerManagementService.loadOrCreateUser(model.getEvent().getMember()); Member member = model.getEvent().getMember();
AUserInAServer userInAServer = userInServerManagementService.loadOrCreateUser(member);
Optional<MeetupParticipant> participationOptional = meetupParticipatorManagementServiceBean.getParticipation(meetup, userInAServer); Optional<MeetupParticipant> participationOptional = meetupParticipatorManagementServiceBean.getParticipation(meetup, userInAServer);
if(participationOptional.isPresent()) { if(participationOptional.isPresent()) {
@@ -57,19 +63,28 @@ public class MeetupDecisionListener implements ButtonClickedListener {
} else { } else {
meetupParticipatorManagementServiceBean.createParticipation(meetup, userInAServer, payload.getMeetupDecision()); meetupParticipatorManagementServiceBean.createParticipation(meetup, userInAServer, payload.getMeetupDecision());
} }
MeetupMessageModel meetupMessageModel = meetupServiceBean.getMeetupMessageModel(meetup); Long meetupMessageId = meetup.getMessageId();
addParticipationToModel(meetupMessageModel, userInAServer, payload.getMeetupDecision()); Long meetupId = meetup.getId().getId();
MessageToSend messageToSend = meetupServiceBean.getMeetupMessage(meetupMessageModel, model.getServerId()); Long meetupServerId = meetup.getServer().getId();
channelService.editMessageInAChannelFuture(messageToSend, model.getEvent().getChannel(), meetup.getMessageId()) meetupServiceBean.getMeetupMessageModel(meetup).thenAccept(meetupMessageModel -> {
.thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetup.getId().getId(), meetup.getMeetupChannel().getId(), meetup.getServer().getId())) self.updateMeetupMessage(model, meetupMessageModel, member, payload, meetupMessageId, meetupId, meetupServerId);
.exceptionally(throwable -> { });
log.info("Failed to update message of meetup {} in channel {} in server {}.", meetup.getId().getId(), meetup.getMeetupChannel().getId(), meetup.getServer().getId(), throwable);
return null;
});
return ButtonClickedListenerResult.ACKNOWLEDGED; return ButtonClickedListenerResult.ACKNOWLEDGED;
} }
private void addParticipationToModel(MeetupMessageModel model, AUserInAServer aUserInAServer, MeetupDecision decision) { @Transactional
public void updateMeetupMessage(ButtonClickedListenerModel model, MeetupMessageModel meetupMessageModel, Member member, MeetupDecisionPayload payload, Long meetupMessageId, Long meetupId, Long meetupServerId) {
addParticipationToModel(meetupMessageModel, member, payload.getMeetupDecision());
MessageToSend messageToSend = meetupServiceBean.getMeetupMessage(meetupMessageModel, model.getServerId());
channelService.editMessageInAChannelFuture(messageToSend, model.getEvent().getChannel(), meetupMessageId)
.thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetupId, meetupMessageId, meetupServerId))
.exceptionally(throwable -> {
log.info("Failed to update message of meetup {} in channel {} in server {}.", meetupId, meetupMessageId, meetupServerId, throwable);
return null;
});
}
private void addParticipationToModel(MeetupMessageModel model, Member aUserInAServer, MeetupDecision decision) {
if(decision.equals(MeetupDecision.NO)) { if(decision.equals(MeetupDecision.NO)) {
addIfMissing(model.getDeclinedParticipants(), aUserInAServer); addIfMissing(model.getDeclinedParticipants(), aUserInAServer);
} else if(decision.equals(MeetupDecision.YES)) { } else if(decision.equals(MeetupDecision.YES)) {
@@ -80,9 +95,9 @@ public class MeetupDecisionListener implements ButtonClickedListener {
addIfMissing(model.getNoTimeParticipants(), aUserInAServer); addIfMissing(model.getNoTimeParticipants(), aUserInAServer);
} }
private void addIfMissing(List<MemberDisplay> list, AUserInAServer aUserInAServer) { private void addIfMissing(List<MemberDisplay> list, Member aUserInAServer) {
if(list.stream().noneMatch(memberDisplay -> memberDisplay.getUserId().equals(aUserInAServer.getUserReference().getId()))) { if(list.stream().noneMatch(memberDisplay -> memberDisplay.getUserId().equals(aUserInAServer.getIdLong()))) {
list.add(MemberDisplay.fromAUserInAServer(aUserInAServer)); list.add(MemberDisplay.fromMember(aUserInAServer));
} }
} }

View File

@@ -16,7 +16,7 @@ public class MeetupMessageModel {
private String description; private String description;
private Instant meetupTime; private Instant meetupTime;
private String location; private String location;
private String decodedLocation; private String locationEncoded;
private MemberDisplay organizer; private MemberDisplay organizer;
private Long meetupId; private Long meetupId;
private String yesId; private String yesId;

View File

@@ -10,6 +10,7 @@ import dev.sheldan.abstracto.core.service.*;
import dev.sheldan.abstracto.core.service.management.ServerManagementService; import dev.sheldan.abstracto.core.service.management.ServerManagementService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend; import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService; import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.CompletableFutureList;
import dev.sheldan.abstracto.core.utils.FileService; import dev.sheldan.abstracto.core.utils.FileService;
import dev.sheldan.abstracto.core.utils.FutureUtils; import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.abstracto.scheduling.model.JobParameters; import dev.sheldan.abstracto.scheduling.model.JobParameters;
@@ -32,6 +33,8 @@ import dev.sheldan.sissi.module.meetup.service.management.MeetupComponentManagem
import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean; import dev.sheldan.sissi.module.meetup.service.management.MeetupManagementServiceBean;
import dev.sheldan.sissi.module.meetup.service.management.MeetupParticipatorManagementServiceBean; import dev.sheldan.sissi.module.meetup.service.management.MeetupParticipatorManagementServiceBean;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.User;
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel; import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel; import net.dv8tion.jda.api.entities.channel.middleman.MessageChannel;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -48,6 +51,8 @@ import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Component @Component
@@ -109,8 +114,16 @@ public class MeetupServiceBean {
@Autowired @Autowired
private MeetupComponentManagementServiceBean meetupComponentManagementServiceBean; private MeetupComponentManagementServiceBean meetupComponentManagementServiceBean;
@Autowired
private MemberService memberService;
private static final String ICS_TIME_STAMP_FORMAT = "yMMdd'T'kkmmss'Z'"; private static final String ICS_TIME_STAMP_FORMAT = "yMMdd'T'kkmmss'Z'";
private static final ZoneId UTC = ZoneId.of("UTC");
private static final DateTimeFormatter ICS_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(ICS_TIME_STAMP_FORMAT); private static final DateTimeFormatter ICS_DATE_TIME_FORMATTER = DateTimeFormatter.ofPattern(ICS_TIME_STAMP_FORMAT);
private static final Predicate<MeetupParticipant> MAYBE_OR_YES_PARTICIPATOR = meetupParticipator ->
meetupParticipator.getDecision().equals(MeetupDecision.MAYBE) ||
meetupParticipator.getDecision().equals(MeetupDecision.YES);
public void storeMeetupConfirmation(MeetupConfirmationModel model) { public void storeMeetupConfirmation(MeetupConfirmationModel model) {
AServer server = serverManagementService.loadServer(model.getGuildId()); AServer server = serverManagementService.loadServer(model.getGuildId());
@@ -142,11 +155,11 @@ public class MeetupServiceBean {
} }
private MeetupIcsModel getMeetupICSModel(Meetup meetup) { private MeetupIcsModel getMeetupICSModel(Meetup meetup) {
ZonedDateTime startTime = meetup.getMeetupTime().atZone(ZoneId.of("UTC")); ZonedDateTime startTime = meetup.getMeetupTime().atZone(UTC);
ZonedDateTime endTime = meetup.getMeetupTime().plus(1, ChronoUnit.HOURS).atZone(ZoneId.of("UTC")); ZonedDateTime endTime = meetup.getMeetupTime().plus(1, ChronoUnit.HOURS).atZone(UTC);
String icsFormattedStartTime = startTime.format(ICS_DATE_TIME_FORMATTER); String icsFormattedStartTime = startTime.format(ICS_DATE_TIME_FORMATTER);
String icsFormattedEndTime = endTime.format(ICS_DATE_TIME_FORMATTER); String icsFormattedEndTime = endTime.format(ICS_DATE_TIME_FORMATTER);
String icsFormattedMeetupCreationTime = Instant.now().atZone(ZoneId.of("UTC")) String icsFormattedMeetupCreationTime = Instant.now().atZone(UTC)
.format(ICS_DATE_TIME_FORMATTER); .format(ICS_DATE_TIME_FORMATTER);
boolean attachIcsFile = featureModeService.featureModeActive(MeetupFeatureDefinition.MEETUP, meetup.getServer().getId(), MeetupFeatureMode.ATTACH_ICS_FILE); boolean attachIcsFile = featureModeService.featureModeActive(MeetupFeatureDefinition.MEETUP, meetup.getServer().getId(), MeetupFeatureMode.ATTACH_ICS_FILE);
return MeetupIcsModel return MeetupIcsModel
@@ -158,51 +171,104 @@ public class MeetupServiceBean {
.build(); .build();
} }
public MeetupMessageModel getMeetupMessageModel(Meetup meetup) { public CompletableFuture<MeetupMessageModel> getMeetupMessageModel(Meetup meetup) {
List<MeetupParticipant> allParticipants = meetup.getParticipants(); List<MeetupParticipant> allParticipants = meetup.getParticipants();
List<MeetupParticipant> participating = allParticipants Long serverId = meetup.getServer().getId();
Function<MeetupParticipant, Long> mapToUserId = (p) -> p.getParticipator().getUserReference().getId();
List<Long> participating = allParticipants
.stream() .stream()
.filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.YES)) .filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.YES))
.collect(Collectors.toList()); .map(mapToUserId)
List<MeetupParticipant> maybe = allParticipants .toList();
List<Long> maybe = allParticipants
.stream() .stream()
.filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.MAYBE)) .filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.MAYBE))
.collect(Collectors.toList()); .map(mapToUserId)
List<MeetupParticipant> notParticipating = allParticipants .toList();
List<Long> notParticipating = allParticipants
.stream() .stream()
.filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.NO)) .filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.NO))
.collect(Collectors.toList()); .map(mapToUserId)
List<MeetupParticipant> notTimeParticipating = allParticipants .toList();
List<Long> notTimeParticipating = allParticipants
.stream() .stream()
.filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.NO_TIME)) .filter(meetupParticipator -> meetupParticipator.getDecision().equals(MeetupDecision.NO_TIME))
.map(mapToUserId)
.toList();
List<Long> participantIds = allParticipants
.stream()
.map(mapToUserId)
.collect(Collectors.toList()); .collect(Collectors.toList());
String rawLocation = java.net.URLDecoder.decode(meetup.getLocation(), StandardCharsets.UTF_8); String locationEncoded = URLEncoder.encode(meetup.getLocation(), StandardCharsets.UTF_8);
return MeetupMessageModel MeetupMessageModel.MeetupMessageModelBuilder builder = MeetupMessageModel
.builder() .builder()
.description(meetup.getDescription()) .description(meetup.getDescription())
.topic(meetup.getTopic()) .topic(meetup.getTopic())
.location(meetup.getLocation()) .location(meetup.getLocation())
.decodedLocation(rawLocation) .locationEncoded(locationEncoded)
.noTimeId(meetup.getNoTimeButtonId()) .noTimeId(meetup.getNoTimeButtonId())
.yesId(meetup.getYesButtonId()) .yesId(meetup.getYesButtonId())
.maybeId(meetup.getMaybeButtonId()) .maybeId(meetup.getMaybeButtonId())
.noId(meetup.getNotInterestedButtonId()) .noId(meetup.getNotInterestedButtonId())
.meetupTime(meetup.getMeetupTime()) .meetupTime(meetup.getMeetupTime())
.meetupId(meetup.getId().getId()) .meetupId(meetup.getId().getId())
.participants(getMemberDisplays(participating))
.declinedParticipants(getMemberDisplays(notParticipating))
.noTimeParticipants(getMemberDisplays(notTimeParticipating))
.maybeParticipants(getMemberDisplays(maybe))
.cancelled(meetup.getState().equals(MeetupState.CANCELLED)) .cancelled(meetup.getState().equals(MeetupState.CANCELLED))
.organizer(MemberDisplay.fromAUserInAServer(meetup.getOrganizer())) .meetupIcsModel(getMeetupICSModel(meetup));
.meetupIcsModel(getMeetupICSModel(meetup)) Long organizerId = meetup.getOrganizer().getUserReference().getId();
.build(); participantIds.add(organizerId);
// only supports 100 members at once, should be enough
CompletableFuture<List<Member>> membersInServerAsync = memberService.getMembersInServerAsync(serverId, participantIds);
return membersInServerAsync.thenCompose(members -> {
Set<Long> foundMembers = members
.stream()
.map(Member::getIdLong)
.collect(Collectors.toSet());
Set<Long> participatingMembers = new HashSet<>(participantIds);
participatingMembers.removeAll(foundMembers);
CompletableFuture<List<User>> userLoading = new CompletableFuture<>();
if(!participatingMembers.isEmpty()) {
CompletableFutureList<User> userFutureList = userService.retrieveUsers(new ArrayList<>(participatingMembers));
userFutureList.getMainFuture().thenAccept(unused -> {
userLoading.complete(userFutureList.getObjects());
});
} else {
userLoading.complete(new ArrayList<>());
}
return userLoading.thenApply(users ->
builder
.participants(getMemberDisplays(members, users, participating, serverId))
.declinedParticipants(getMemberDisplays(members, users, notParticipating, serverId))
.noTimeParticipants(getMemberDisplays(members, users, notTimeParticipating, serverId))
.maybeParticipants(getMemberDisplays(members, users, maybe, serverId))
.organizer(getMemberDisplays(members, users, Arrays.asList(organizerId), serverId).get(0))
.build());
});
} }
private List<MemberDisplay> getMemberDisplays(List<MeetupParticipant> participants) { private List<MemberDisplay> getMemberDisplays(List<Member> members, List<User> users, List<Long> participants, Long serverId) {
Map<Long, Member> memberMap = members.stream()
.collect(Collectors.toMap(Member::getIdLong, Function.identity()));
Map<Long, User> userMap = users.stream()
.collect(Collectors.toMap(User::getIdLong, Function.identity()));
return participants return participants
.stream() .stream()
.map(meetupParticipator -> MemberDisplay.fromAUserInAServer(meetupParticipator.getParticipator())) .map(meetupParticipator -> {
if(memberMap.containsKey(meetupParticipator)) {
return MemberDisplay.fromMember(memberMap.get(meetupParticipator));
} else if(userMap.containsKey(meetupParticipator)) {
User user = userMap.get(meetupParticipator);
// a user display would be more appropriate, but I dont want to deal with the implications
return MemberDisplay
.builder()
.serverId(serverId)
.userId(user.getIdLong())
.name(user.getEffectiveName())
.avatarUrl(user.getEffectiveAvatarUrl())
.build();
}
return MemberDisplay.fromIds(serverId, meetupParticipator);
})
.collect(Collectors.toList()); .collect(Collectors.toList());
} }
@@ -214,40 +280,43 @@ public class MeetupServiceBean {
Long serverId = meetup.getServer().getId(); Long serverId = meetup.getServer().getId();
Long meetupId = meetup.getId().getId(); Long meetupId = meetup.getId().getId();
GuildMessageChannel channel = channelService.getMessageChannelFromServer(serverId, meetup.getMeetupChannel().getId()); GuildMessageChannel channel = channelService.getMessageChannelFromServer(serverId, meetup.getMeetupChannel().getId());
MeetupMessageModel model = getMeetupMessageModel(meetup);
List<String> componentPayloads = meetup List<String> componentPayloads = meetup
.getMeetupComponents() .getMeetupComponents()
.stream() .stream()
.map(meetupComponent -> meetupComponent.getId().getComponentId()) .map(meetupComponent -> meetupComponent.getId().getComponentId())
.collect(Collectors.toList()); .collect(Collectors.toList());
model.setCancelled(true); Long meetupMessageId = meetup.getMessageId();
MessageToSend meetupMessage = getMeetupMessage(model, serverId); return getMeetupMessageModel(meetup).thenCompose(model -> {
return messageService.editMessageInChannel(channel, meetupMessage, meetup.getMessageId()) model.setCancelled(true);
.thenAccept(unused -> self.notifyParticipants(meetupId, serverId)) MessageToSend meetupMessage = getMeetupMessage(model, serverId);
.thenAccept(unused -> self.cleanupMeetup(meetupId, serverId, componentPayloads)); return messageService.editMessageInChannel(channel, meetupMessage, meetupMessageId)
.thenAccept(unused -> self.notifyParticipants(meetupId, serverId))
.thenAccept(unused -> self.cleanupMeetup(meetupId, serverId, componentPayloads));
});
} }
@Transactional @Transactional
public void notifyParticipants(Long meetupId, Long serverId) { public void notifyParticipants(Long meetupId, Long serverId) {
Meetup meetup = meetupManagementServiceBean.getMeetup(meetupId, serverId); Meetup meetup = meetupManagementServiceBean.getMeetup(meetupId, serverId);
MeetupMessageModel model = getMeetupMessageModel(meetup); List<Long> participatorIds = getYesOrMaybeParticipants(meetup);
getMeetupMessageModel(meetup).thenAccept(model -> {
self.sendNotifications(meetupId, serverId, model, participatorIds);
});
}
@Transactional
public void sendNotifications(Long meetupId, Long serverId, MeetupMessageModel model, List<Long> participatorIds) {
MessageToSend messageToSend = templateService.renderEmbedTemplate(MEETUP_CANCELLATION_TEMPLATE, model, serverId); MessageToSend messageToSend = templateService.renderEmbedTemplate(MEETUP_CANCELLATION_TEMPLATE, model, serverId);
meetup participatorIds.forEach(userId -> {
.getParticipants() userService.retrieveUserForId(userId)
.stream() .thenCompose(user -> messageService.sendMessageToSendToUser(user, messageToSend))
.filter(meetupParticipator -> .thenAccept(message -> log.info("Notified user {} about cancellation of meetup {} in server {}.", userId, meetupId, serverId))
meetupParticipator.getDecision().equals(MeetupDecision.MAYBE) || .exceptionally(throwable -> {
meetupParticipator.getDecision().equals(MeetupDecision.YES)) log.warn("Failed to notify user {} about cancellation of meetup {} in server {}.", userId, meetupId, serverId);
.forEach(meetupParticipator -> { return null;
Long userId = meetupParticipator.getParticipator().getUserReference().getId(); });
userService.retrieveUserForId(userId) });
.thenCompose(user -> messageService.sendMessageToSendToUser(user, messageToSend))
.thenAccept(message -> log.info("Notified user {} about cancellation of meetup {} in server {}.", userId, meetupId, serverId))
.exceptionally(throwable -> {
log.warn("Failed to notify user {} about cancellation of meetup {} in server {}.", userId, meetupId, serverId);
return null;
});
});
} }
@Transactional @Transactional
@@ -318,20 +387,29 @@ public class MeetupServiceBean {
@Transactional @Transactional
public void remindParticipants(Long meetupId, Long serverId) { public void remindParticipants(Long meetupId, Long serverId) {
Meetup meetup = meetupManagementServiceBean.getMeetup(meetupId, serverId); Meetup meetup = meetupManagementServiceBean.getMeetup(meetupId, serverId);
MeetupMessageModel model = getMeetupMessageModel(meetup); List<Long> participatorIds = getYesOrMaybeParticipants(meetup);
getMeetupMessageModel(meetup).thenAccept(model -> {
self.sendMeetupReminderMessages(meetupId, serverId, model, participatorIds);
});
}
@Transactional
public void sendMeetupReminderMessages(Long meetupId, Long serverId, MeetupMessageModel model, List<Long> participatorIds) {
MessageToSend messageToSend = templateService.renderEmbedTemplate(MEETUP_REMINDER_TEMPLATE, model, serverId); MessageToSend messageToSend = templateService.renderEmbedTemplate(MEETUP_REMINDER_TEMPLATE, model, serverId);
meetup participatorIds.forEach(userId -> {
userService.retrieveUserForId(userId)
.thenCompose(user -> messageService.sendMessageToSendToUser(user, messageToSend))
.thenAccept(message -> log.info("Notified user {} about incoming meetup {} in server {}.", userId, meetupId, serverId));
});
}
private List<Long> getYesOrMaybeParticipants(Meetup meetup) {
return meetup
.getParticipants() .getParticipants()
.stream() .stream()
.filter(meetupParticipator -> .filter(MAYBE_OR_YES_PARTICIPATOR)
meetupParticipator.getDecision().equals(MeetupDecision.MAYBE) || .map(meetupParticipant -> meetupParticipant.getParticipator().getUserReference().getId())
meetupParticipator.getDecision().equals(MeetupDecision.YES)) .toList();
.forEach(meetupParticipator -> {
Long userId = meetupParticipator.getParticipator().getUserReference().getId();
userService.retrieveUserForId(userId)
.thenCompose(user -> messageService.sendMessageToSendToUser(user, messageToSend))
.thenAccept(message -> log.info("Notified user {} about incoming meetup {} in server {}.", userId, meetupId, serverId));
});
} }
@Transactional @Transactional
@@ -376,11 +454,12 @@ public class MeetupServiceBean {
Long serverId = meetup.getServer().getId(); Long serverId = meetup.getServer().getId();
Long meetupMessageId = meetup.getMessageId();
ServerChannelMessage meetupMessage = ServerChannelMessage ServerChannelMessage meetupMessage = ServerChannelMessage
.builder() .builder()
.serverId(serverId) .serverId(serverId)
.channelId(meetup.getMeetupChannel().getId()) .channelId(meetup.getMeetupChannel().getId())
.messageId(meetup.getMessageId()) .messageId(meetupMessageId)
.build(); .build();
MeetupTimeChangedNotificationModel notificationModel = MeetupTimeChangedNotificationModel MeetupTimeChangedNotificationModel notificationModel = MeetupTimeChangedNotificationModel
.builder() .builder()
@@ -418,18 +497,24 @@ public class MeetupServiceBean {
.toList(); .toList();
meetup meetup
.getParticipants().removeIf(meetupParticipant -> userInServerIds.contains(meetupParticipant.getParticipator().getUserInServerId())); .getParticipants().removeIf(meetupParticipant -> userInServerIds.contains(meetupParticipant.getParticipator().getUserInServerId()));
MeetupMessageModel meetupMessageModel = getMeetupMessageModel(meetup); Long meetupChannelId = meetup.getMeetupChannel().getId();
return getMeetupMessageModel(meetup).thenCompose(meetupMessageModel ->
self.changeMeetupTimeInternal(meetupMessageModel, serverId, meetupChannelId, meetupMessageId, meetupId));
}
@Transactional
public CompletableFuture<Void> changeMeetupTimeInternal(MeetupMessageModel meetupMessageModel, Long serverId, Long meetupChannelId, Long meetupMessageId, Long meetupId) {
meetupMessageModel.setParticipants(new ArrayList<>()); meetupMessageModel.setParticipants(new ArrayList<>());
meetupMessageModel.setMaybeParticipants(new ArrayList<>()); meetupMessageModel.setMaybeParticipants(new ArrayList<>());
meetupMessageModel.setNoTimeParticipants(new ArrayList<>()); meetupMessageModel.setNoTimeParticipants(new ArrayList<>());
MessageToSend updatedMeetupMessage = getMeetupMessage(meetupMessageModel, serverId); MessageToSend updatedMeetupMessage = getMeetupMessage(meetupMessageModel, serverId);
GuildMessageChannel meetupChannel = channelService.getMessageChannelFromServer(serverId, meetup.getMeetupChannel().getId()); GuildMessageChannel meetupChannel = channelService.getMessageChannelFromServer(serverId, meetupChannelId);
return channelService.editMessageInAChannelFuture(updatedMeetupMessage, meetupChannel, meetup.getMessageId()) return channelService.editMessageInAChannelFuture(updatedMeetupMessage, meetupChannel, meetupMessageId)
.thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId)) .thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetupId, meetupChannelId, serverId))
.thenAccept(unused -> fileService.safeDeleteIgnoreException(updatedMeetupMessage.getAttachedFiles().get(0).getFile())) .thenAccept(unused -> fileService.safeDeleteIgnoreException(updatedMeetupMessage.getAttachedFiles().get(0).getFile()))
.exceptionally(throwable -> { .exceptionally(throwable -> {
log.info("Failed to update message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId, throwable); log.info("Failed to update message of meetup {} in channel {} in server {}.", meetupId, meetupChannelId, serverId, throwable);
return null; return null;
}); });
} }
@@ -440,11 +525,7 @@ public class MeetupServiceBean {
} }
public CompletableFuture<Void> changeMeetupLocation(Meetup meetup, String newLocation) { public CompletableFuture<Void> changeMeetupLocation(Meetup meetup, String newLocation) {
try { meetup.setLocation(newLocation);
meetup.setLocation(URLEncoder.encode(newLocation, StandardCharsets.UTF_8.toString()));
} catch (UnsupportedEncodingException e) {
throw new AbstractoRunTimeException(e);
}
return updateMeetupMessage(meetup); return updateMeetupMessage(meetup);
} }
@@ -456,14 +537,21 @@ public class MeetupServiceBean {
private CompletableFuture<Void> updateMeetupMessage(Meetup meetup) { private CompletableFuture<Void> updateMeetupMessage(Meetup meetup) {
Long meetupId = meetup.getId().getId(); Long meetupId = meetup.getId().getId();
Long serverId = meetup.getId().getServerId(); Long serverId = meetup.getId().getServerId();
MeetupMessageModel meetupMessageModel = getMeetupMessageModel(meetup); Long meetupChannelId = meetup.getMeetupChannel().getId();
Long meetupMessageId = meetup.getMessageId();
return getMeetupMessageModel(meetup).thenCompose(meetupMessageModel ->
self.updateMessageInternal(meetupMessageModel, serverId, meetupChannelId, meetupMessageId, meetupId));
}
@Transactional
public CompletableFuture<Void> updateMessageInternal(MeetupMessageModel meetupMessageModel, Long serverId, Long meetupChannelId, Long meetupMessageId, Long meetupId) {
MessageToSend updatedMeetupMessage = getMeetupMessage(meetupMessageModel, serverId); MessageToSend updatedMeetupMessage = getMeetupMessage(meetupMessageModel, serverId);
GuildMessageChannel meetupChannel = channelService.getMessageChannelFromServer(serverId, meetup.getMeetupChannel().getId()); GuildMessageChannel meetupChannel = channelService.getMessageChannelFromServer(serverId, meetupChannelId);
return channelService.editMessageInAChannelFuture(updatedMeetupMessage, meetupChannel, meetup.getMessageId()) return channelService.editMessageInAChannelFuture(updatedMeetupMessage, meetupChannel, meetupMessageId)
.thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId)) .thenAccept(message -> log.info("Updated message of meetup {} in channel {} in server {}.", meetupId, meetupChannelId, serverId))
.thenAccept(unused -> fileService.safeDeleteIgnoreException(updatedMeetupMessage.getAttachedFiles().get(0).getFile())) .thenAccept(unused -> fileService.safeDeleteIgnoreException(updatedMeetupMessage.getAttachedFiles().get(0).getFile()))
.exceptionally(throwable -> { .exceptionally(throwable -> {
log.info("Failed to update message of meetup {} in channel {} in server {}.", meetupId, meetup.getMeetupChannel().getId(), serverId, throwable); log.info("Failed to update message of meetup {} in channel {} in server {}.", meetupId, meetupChannelId, serverId, throwable);
return null; return null;
}); });
} }

View File

@@ -30,10 +30,6 @@ public class MeetupComponentManagementServiceBean {
return meetupComponentRepository.save(component); return meetupComponentRepository.save(component);
} }
public void deleteComponent(MeetupComponent meetupComponent) {
meetupComponentRepository.delete(meetupComponent);
}
public void deleteAllComponents(Meetup meetup) { public void deleteAllComponents(Meetup meetup) {
meetupComponentRepository.deleteAll(meetup.getMeetupComponents()); meetupComponentRepository.deleteAll(meetup.getMeetupComponents());
} }

View File

@@ -35,23 +35,18 @@ public class MeetupManagementServiceBean {
throw new MeetupPastTimeException(); throw new MeetupPastTimeException();
} }
Long meetupId = counterService.getNextCounterValue(organizer.getServerReference(), MEETUP_COUNTER_KEY); Long meetupId = counterService.getNextCounterValue(organizer.getServerReference(), MEETUP_COUNTER_KEY);
Meetup meetup = null; Meetup meetup = Meetup
try {
meetup = Meetup
.builder() .builder()
.meetupTime(timeStamp) .meetupTime(timeStamp)
.description(description) .description(description)
.topic(topic) .topic(topic)
.location(URLEncoder.encode(location, StandardCharsets.UTF_8.toString())) .location(location)
.organizer(organizer) .organizer(organizer)
.server(organizer.getServerReference()) .server(organizer.getServerReference())
.meetupChannel(meetupChannel) .meetupChannel(meetupChannel)
.state(MeetupState.NEW) .state(MeetupState.NEW)
.id(new ServerSpecificId(organizer.getServerReference().getId(), meetupId)) .id(new ServerSpecificId(organizer.getServerReference().getId(), meetupId))
.build(); .build();
} catch (UnsupportedEncodingException e) {
throw new AbstractoRunTimeException(e);
}
return meetupRepository.save(meetup); return meetupRepository.save(meetup);
} }

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>sissi-modules</artifactId> <artifactId>sissi-modules</artifactId>
<groupId>dev.sheldan.sissi.application</groupId> <groupId>dev.sheldan.sissi.application</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -5,19 +5,17 @@ import dev.sheldan.abstracto.core.service.PostTargetService;
import dev.sheldan.abstracto.core.service.management.UserInServerManagementService; import dev.sheldan.abstracto.core.service.management.UserInServerManagementService;
import dev.sheldan.abstracto.core.templating.model.MessageToSend; import dev.sheldan.abstracto.core.templating.model.MessageToSend;
import dev.sheldan.abstracto.core.templating.service.TemplateService; import dev.sheldan.abstracto.core.templating.service.TemplateService;
import dev.sheldan.abstracto.core.utils.CompletableFutureList; import dev.sheldan.abstracto.core.utils.FutureUtils;
import dev.sheldan.sissi.module.miepscord.weeklytext.config.WeeklyTextPostTarget; import dev.sheldan.sissi.module.miepscord.weeklytext.config.WeeklyTextPostTarget;
import dev.sheldan.sissi.module.miepscord.weeklytext.model.database.TextItem; import dev.sheldan.sissi.module.miepscord.weeklytext.model.database.TextItem;
import dev.sheldan.sissi.module.miepscord.weeklytext.model.template.TextItemPostModel; import dev.sheldan.sissi.module.miepscord.weeklytext.model.template.TextItemPostModel;
import dev.sheldan.sissi.module.miepscord.weeklytext.service.management.TextItemServiceManagementBean; import dev.sheldan.sissi.module.miepscord.weeklytext.service.management.TextItemServiceManagementBean;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.Message;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import java.util.Optional; import java.util.Optional;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@@ -66,9 +64,7 @@ public class TextItemServiceBean {
.text(textItem.getText()) .text(textItem.getText())
.build(); .build();
MessageToSend messageToSend = templateService.renderEmbedTemplate(WEEKLY_TEXT_ITEM_POST_TEMPLATE, model, serverId); MessageToSend messageToSend = templateService.renderEmbedTemplate(WEEKLY_TEXT_ITEM_POST_TEMPLATE, model, serverId);
List<CompletableFuture<Message>> futures = postTargetService.sendEmbedInPostTarget(messageToSend, WeeklyTextPostTarget.TEXT_ITEM_TARGET, serverId); return FutureUtils.toSingleFutureGenericList(postTargetService.sendEmbedInPostTarget(messageToSend, WeeklyTextPostTarget.TEXT_ITEM_TARGET, serverId)).thenAccept(unused -> {
CompletableFutureList<Message> futureList = new CompletableFutureList<>(futures);
return futureList.getMainFuture().thenAccept(unused -> {
self.setTexItemToDone(textItemId); self.setTexItemToDone(textItemId);
}); });
} }

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.application</groupId> <groupId>dev.sheldan.sissi.application</groupId>
<artifactId>application</artifactId> <artifactId>application</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.application</groupId> <groupId>dev.sheldan.sissi.application</groupId>
<artifactId>sissi-modules</artifactId> <artifactId>sissi-modules</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>sissi-modules</artifactId> <artifactId>sissi-modules</artifactId>
<groupId>dev.sheldan.sissi.application</groupId> <groupId>dev.sheldan.sissi.application</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -2,4 +2,4 @@ apiVersion: v2
name: sissi name: sissi
description: A Helm chart for Kubernetes description: A Helm chart for Kubernetes
type: application type: application
version: 1.5.16 version: 1.5.22

View File

@@ -20,7 +20,6 @@
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"links": [], "links": [],
"liveNow": false,
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
@@ -33,11 +32,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -69,7 +70,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -95,10 +96,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -127,11 +130,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -163,7 +168,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -189,10 +194,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -221,11 +228,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -257,7 +266,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -283,10 +292,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -315,11 +326,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -351,7 +364,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -377,10 +390,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -409,11 +424,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -445,7 +462,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -471,10 +488,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -542,11 +561,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -578,7 +599,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -604,10 +625,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -636,11 +659,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -672,7 +697,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -698,10 +723,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -730,11 +757,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -766,7 +795,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -792,10 +821,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -824,11 +855,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -860,7 +893,100 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 15,
"w": 24,
"x": 0,
"y": 32
},
"id": 11,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom",
"showLegend": true
},
"tooltip": {
"hideZeros": false,
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "12.1.1",
"targets": [
{
"editorMode": "code",
"expr": "increase(jda_request_total{namespace=\"sissi\"}[1m]) / 2",
"legendFormat": "{{ "{{" }} http_key {{ "}}" }}",
"range": true,
"refId": "A"
}
],
"title": "HTTP Requests",
"type": "timeseries"
},
{
"datasource": {
"type": "prometheus",
"uid": "prometheus"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisBorderShow": false,
"axisCenteredZero": false,
"axisColorMode": "text",
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"insertNulls": false,
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -875,7 +1001,7 @@
"h": 16, "h": 16,
"w": 24, "w": 24,
"x": 0, "x": 0,
"y": 32 "y": 47
}, },
"id": 9, "id": 9,
"options": { "options": {
@@ -886,10 +1012,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -908,18 +1036,21 @@
"type": "timeseries" "type": "timeseries"
} }
], ],
"preload": false,
"refresh": "", "refresh": "",
"schemaVersion": 38, "schemaVersion": 41,
"style": "dark",
"tags": [], "tags": [],
"templating": { "templating": {
"list": [ "list": [
{ {
"current": {
"text": "Sissi",
"value": "Sissi"
},
"hide": 2, "hide": 2,
"label": "",
"name": "application", "name": "application",
"query": "Sissi", "query": "Sissi",
"skipUrlSync": false, "skipUrlSync": true,
"type": "constant" "type": "constant"
} }
] ]
@@ -932,7 +1063,7 @@
"timezone": "", "timezone": "",
"title": "Sissi Discord status", "title": "Sissi Discord status",
"uid": "a7b3297d-972e-4dbd-9223-88d589817d34", "uid": "a7b3297d-972e-4dbd-9223-88d589817d34",
"version": 2, "version": 3,
"weekStart": "" "weekStart": ""
}, },
"overwrite": true "overwrite": true

View File

@@ -20,8 +20,8 @@
"editable": true, "editable": true,
"fiscalYearStartMonth": 0, "fiscalYearStartMonth": 0,
"graphTooltip": 0, "graphTooltip": 0,
"id": 12,
"links": [], "links": [],
"liveNow": false,
"panels": [ "panels": [
{ {
"datasource": { "datasource": {
@@ -29,6 +29,10 @@
"uid": "loki" "uid": "loki"
}, },
"description": "Display logs and search for logs", "description": "Display logs and search for logs",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": { "gridPos": {
"h": 13, "h": 13,
"w": 24, "w": 24,
@@ -38,6 +42,7 @@
"id": 4, "id": 4,
"options": { "options": {
"dedupStrategy": "none", "dedupStrategy": "none",
"enableInfiniteScrolling": false,
"enableLogDetails": true, "enableLogDetails": true,
"prettifyLogMessage": false, "prettifyLogMessage": false,
"showCommonLabels": false, "showCommonLabels": false,
@@ -46,6 +51,7 @@
"sortOrder": "Ascending", "sortOrder": "Ascending",
"wrapLogMessage": true "wrapLogMessage": true
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -68,6 +74,10 @@
"uid": "loki" "uid": "loki"
}, },
"description": "Any line on level ERROR", "description": "Any line on level ERROR",
"fieldConfig": {
"defaults": {},
"overrides": []
},
"gridPos": { "gridPos": {
"h": 8, "h": 8,
"w": 12, "w": 12,
@@ -77,6 +87,7 @@
"id": 2, "id": 2,
"options": { "options": {
"dedupStrategy": "none", "dedupStrategy": "none",
"enableInfiniteScrolling": false,
"enableLogDetails": true, "enableLogDetails": true,
"prettifyLogMessage": false, "prettifyLogMessage": false,
"showCommonLabels": false, "showCommonLabels": false,
@@ -85,6 +96,7 @@
"sortOrder": "Ascending", "sortOrder": "Ascending",
"wrapLogMessage": true "wrapLogMessage": true
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -113,11 +125,13 @@
"mode": "palette-classic" "mode": "palette-classic"
}, },
"custom": { "custom": {
"axisBorderShow": false,
"axisCenteredZero": false, "axisCenteredZero": false,
"axisColorMode": "text", "axisColorMode": "text",
"axisLabel": "", "axisLabel": "",
"axisPlacement": "auto", "axisPlacement": "auto",
"barAlignment": 0, "barAlignment": 0,
"barWidthFactor": 0.6,
"drawStyle": "line", "drawStyle": "line",
"fillOpacity": 0, "fillOpacity": 0,
"gradientMode": "none", "gradientMode": "none",
@@ -149,7 +163,7 @@
"steps": [ "steps": [
{ {
"color": "green", "color": "green",
"value": null "value": 0
}, },
{ {
"color": "red", "color": "red",
@@ -175,10 +189,12 @@
"showLegend": true "showLegend": true
}, },
"tooltip": { "tooltip": {
"hideZeros": false,
"mode": "single", "mode": "single",
"sort": "none" "sort": "none"
} }
}, },
"pluginVersion": "12.1.1",
"targets": [ "targets": [
{ {
"datasource": { "datasource": {
@@ -195,20 +211,18 @@
"type": "timeseries" "type": "timeseries"
} }
], ],
"preload": false,
"refresh": "", "refresh": "",
"schemaVersion": 38, "schemaVersion": 41,
"style": "dark",
"tags": [], "tags": [],
"templating": { "templating": {
"list": [ "list": [
{ {
"current": { "current": {
"selected": false,
"text": "", "text": "",
"value": "" "value": ""
}, },
"description": "What to search in the logs", "description": "What to search in the logs",
"hide": 0,
"name": "logFilter", "name": "logFilter",
"options": [ "options": [
{ {
@@ -218,7 +232,6 @@
} }
], ],
"query": "", "query": "",
"skipUrlSync": false,
"type": "textbox" "type": "textbox"
} }
] ]
@@ -231,7 +244,7 @@
"timezone": "", "timezone": "",
"title": "Sissi Logs", "title": "Sissi Logs",
"uid": "a5b429af-860c-4438-a575-24bed6dcba09", "uid": "a5b429af-860c-4438-a575-24bed6dcba09",
"version": 2, "version": 3,
"weekStart": "" "weekStart": ""
}, },
"overwrite": true "overwrite": true

View File

@@ -3,7 +3,7 @@ bot:
repository: harbor.sheldan.dev/sissi repository: harbor.sheldan.dev/sissi
pullPolicy: Always pullPolicy: Always
image: sissi-bot image: sissi-bot
tag: 1.5.16 tag: 1.5.22
livenessProbe: livenessProbe:
initialDelaySeconds: 60 initialDelaySeconds: 60
periodSeconds: 5 periodSeconds: 5
@@ -23,7 +23,7 @@ restApi:
repository: harbor.sheldan.dev/sissi repository: harbor.sheldan.dev/sissi
pullPolicy: Always pullPolicy: Always
image: sissi-rest-api image: sissi-rest-api
tag: 1.5.16 tag: 1.5.22
podAnnotations: {} podAnnotations: {}
podSecurityContext: {} podSecurityContext: {}
securityContext: {} securityContext: {}
@@ -63,7 +63,7 @@ privateRestApi:
repository: harbor.sheldan.dev/sissi repository: harbor.sheldan.dev/sissi
pullPolicy: Always pullPolicy: Always
image: sissi-private-rest-api image: sissi-private-rest-api
tag: 1.5.16 tag: 1.5.22
podAnnotations: {} podAnnotations: {}
podSecurityContext: {} podSecurityContext: {}
securityContext: {} securityContext: {}
@@ -94,23 +94,23 @@ templateDeployment:
repository: harbor.sheldan.dev/abstracto repository: harbor.sheldan.dev/abstracto
pullPolicy: Always pullPolicy: Always
image: abstracto-template-deployment image: abstracto-template-deployment
tag: 1.6.17 tag: 1.6.22
templateDeploymentData: templateDeploymentData:
repository: harbor.sheldan.dev/sissi repository: harbor.sheldan.dev/sissi
pullPolicy: Always pullPolicy: Always
image: sissi-template-data image: sissi-template-data
tag: 1.5.16 tag: 1.5.22
dbConfigDeployment: dbConfigDeployment:
enabled: true enabled: true
repository: harbor.sheldan.dev/abstracto repository: harbor.sheldan.dev/abstracto
pullPolicy: Always pullPolicy: Always
image: abstracto-db-deployment image: abstracto-db-deployment
tag: 1.6.17 tag: 1.6.22
dbConfigDeploymentData: dbConfigDeploymentData:
repository: harbor.sheldan.dev/sissi repository: harbor.sheldan.dev/sissi
pullPolicy: Always pullPolicy: Always
image: sissi-db-data image: sissi-db-data
tag: 1.5.16 tag: 1.5.22
dbCredentials: dbCredentials:
host: null host: null
port: null port: null

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi</groupId> <groupId>dev.sheldan.sissi</groupId>
<artifactId>deployment</artifactId> <artifactId>deployment</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi</groupId> <groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId> <artifactId>sissi</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -13,13 +13,13 @@
<groupId>dev.sheldan.sissi</groupId> <groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId> <artifactId>sissi</artifactId>
<name>Sissi</name> <name>Sissi</name>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
<properties> <properties>
<maven.compiler.target>17</maven.compiler.target> <maven.compiler.target>17</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source> <maven.compiler.source>17</maven.compiler.source>
<abstracto.version>1.6.17</abstracto.version> <abstracto.version>1.6.22</abstracto.version>
<abstracto.templates.version>1.4.63</abstracto.templates.version> <abstracto.templates.version>1.4.68</abstracto.templates.version>
<apache-jena.version>4.9.0</apache-jena.version> <apache-jena.version>4.9.0</apache-jena.version>
<rssreader.version>3.5.0</rssreader.version> <rssreader.version>3.5.0</rssreader.version>
<jsoup.version>1.21.2</jsoup.version> <jsoup.version>1.21.2</jsoup.version>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi</groupId> <groupId>dev.sheldan.sissi</groupId>
<artifactId>sissi</artifactId> <artifactId>sissi</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>customization-templates</artifactId> <artifactId>customization-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<artifactId>image-generation-customization-templates</artifactId> <artifactId>image-generation-customization-templates</artifactId>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>customization-templates</artifactId> <artifactId>customization-templates</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>sissi-templates</artifactId> <artifactId>sissi-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>module-templates</artifactId> <artifactId>module-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -0,0 +1,38 @@
{
<#assign userPing="<@186558865851154435>">
"additionalMessage": "${userPing}",
"embeds": [
{
"title": {
<#assign donatorName><#if donation.anonymous><#include "donations_response_anonymous"><#else>${donation.donatorName}</#if></#assign>
<#assign donationAmount=donation.amount>
"title": "<@safe_include "debra_donation_notification_embed_title"/>"
},
<#if donation.message != 'gespendet'>
<#assign donationMessage=donation.message>
"description": "${donationMessage?json_string}",
</#if>
"fields": [
{
<#assign totalDonationAmount=totalDonationAmount>
"name": "<@safe_include "debra_donation_notification_embed_field_amount_title"/>",
"value": "<@safe_include "debra_donation_notification_embed_field_amount_value"/>"
}
],
"imageUrl": "https://cdn.discordapp.com/attachments/299115929206390784/1047306670319079474/dotpict-1.png",
"footer": {
"text": "<@safe_include "debra_donation_notification_embed_footer"/>"
}
}
],
"buttons": [
{
"label": "<@safe_include "debra_donation_notification_link_button_label"/>",
"url": "https://tinyurl.com/debra25",
"buttonStyle": "link",
"metaConfig": {
"persistCallback": false
}
}
]
}

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>module-templates</artifactId> <artifactId>module-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -2,7 +2,7 @@
{ {
"components": [ "components": [
{ {
<#assign hasLocation=location?? && location != "%22%22"> <#assign hasLocation=location?has_content>
"type": "textDisplay", "type": "textDisplay",
"content": "<#include "createMeetup_meetup_information">" "content": "<#include "createMeetup_meetup_information">"
}, },

View File

@@ -1,35 +1,38 @@
<#include "format_instant"> <#include "format_instant">
{ {
<#macro display_user member_to_display><#if member_to_display.name??>${member_to_display.name}<#else>${member_to_display.memberMention}</#if></#macro>
"components": [ "components": [
{ {
"type": "textDisplay", "type": "textDisplay",
<#assign roleMention="<@&371419588619141121>"/> <#assign roleMention="<@&371419588619141121>"/>
"content": "<#if cancelled>~~</#if>${roleMention?json_string} ${topic?json_string} - <@safe_include "meetup_message_id_display"/><#if cancelled>~~</#if>" "content": "<#if cancelled>~~</#if>${roleMention?json_string} ${topic?json_string} - <@safe_include "meetup_message_id_display"/><#if cancelled>~~</#if>"
}, },
<#if description?has_content>
{ {
<#assign descriptionText>${description?json_string}</#assign> <#assign descriptionText><#if description?has_content>${description?json_string}<#else><@safe_include "meetup_description_no_description"/></#if></#assign>
<#assign organizerText>${organizer.memberMention}</#assign> <#assign organizerText><@display_user member_to_display=organizer/></#assign>
"type": "textDisplay", "type": "textDisplay",
"content": "<#if cancelled>~~</#if><@safe_include "meetup_description_component"/><#if cancelled>~~</#if>" "content": "<#if cancelled>~~</#if><@safe_include "meetup_description_component"/><#if cancelled>~~</#if>"
}, },
</#if>
{ {
<#assign time><@format_instant_long_date_time instant=meetupTime/></#assign> <#assign time><@format_instant_long_date_time instant=meetupTime/></#assign>
<#assign timeRelative><@format_instant_relative instant=meetupTime/></#assign> <#assign timeRelative><@format_instant_relative instant=meetupTime/></#assign>
<#if location?? && location != "%22%22"> <#if location?has_content>
"type": "section", "type": "section",
"components": [ "components": [
{ {
"type": "textDisplay", "type": "textDisplay",
"content": "<@safe_include "meetup_display_time_component"/>" "content": "<@safe_include "meetup_display_time_component"/>"
},
{
"type": "textDisplay",
"content": "<@safe_include "meetup_message_location_button_label"/>: ${location?json_string}"
} }
], ],
"accessory": { "accessory": {
"type": "button", "type": "button",
"label": "<@safe_include "meetup_message_location_button_label"/>", "label": "<@safe_include "meetup_message_location_button_label"/>",
"url": "https://www.google.com/maps?q=${location?json_string}", "url": "https://www.google.com/maps?q=${locationEncoded?json_string}",
"buttonStyle": "link" "buttonStyle": "link"
} }
<#else> <#else>
@@ -54,10 +57,10 @@
} }
} }
</#macro> </#macro>
<#assign participantsText> (${participants?size}) <#list participants as member>${member.memberMention}<#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign> <#assign participantsText> (${participants?size}) <#list participants as member><@display_user member_to_display=member/><#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign>
<#assign maybeParticipantsText> (${maybeParticipants?size}) <#list maybeParticipants as member>${member.memberMention}<#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign> <#assign maybeParticipantsText> (${maybeParticipants?size}) <#list maybeParticipants as member><@display_user member_to_display=member/><#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign>
<#assign noTimeParticipantsText> (${noTimeParticipants?size}) <#list noTimeParticipants as member>${member.memberMention}<#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign> <#assign noTimeParticipantsText> (${noTimeParticipants?size}) <#list noTimeParticipants as member><@display_user member_to_display=member/><#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign>
<#assign declinedParticipantsText> (${declinedParticipants?size}) <#list declinedParticipants as member>${member.memberMention}<#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign> <#assign declinedParticipantsText> (${declinedParticipants?size}) <#list declinedParticipants as member><@display_user member_to_display=member/><#sep>, </#sep><#else><#include "meetup_message_no_member"></#list></#assign>
,<@decision_component yesId "success" "meetup_message_yes_button_label" "meetup_user_display_participants" participantsText/> ,<@decision_component yesId "success" "meetup_message_yes_button_label" "meetup_user_display_participants" participantsText/>
,<@decision_component maybeId "secondary" "meetup_message_maybe_button_label" "meetup_user_display_maybe_participants" maybeParticipantsText/> ,<@decision_component maybeId "secondary" "meetup_message_maybe_button_label" "meetup_user_display_maybe_participants" maybeParticipantsText/>
,<@decision_component noId "danger" "meetup_message_no_button_label" "meetup_user_display_declined_participants" declinedParticipantsText/> ,<@decision_component noId "danger" "meetup_message_no_button_label" "meetup_user_display_declined_participants" declinedParticipantsText/>

View File

@@ -8,6 +8,6 @@ DTSTART:${meetupIcsModel.icsFormattedStartTime}
DTEND:${meetupIcsModel.icsFormattedEndTime} DTEND:${meetupIcsModel.icsFormattedEndTime}
SUMMARY:${topic} SUMMARY:${topic}
<#if description?has_content>DESCRIPTION:${description}</#if> <#if description?has_content>DESCRIPTION:${description}</#if>
<#if decodedLocation?? && decodedLocation != "">LOCATION:${decodedLocation}</#if> <#if location?? && location != "">LOCATION:${location}</#if>
END:VEVENT END:VEVENT
END:VCALENDAR END:VCALENDAR

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>module-templates</artifactId> <artifactId>module-templates</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<artifactId>miepscord-templates</artifactId> <artifactId>miepscord-templates</artifactId>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>sissi-templates</artifactId> <artifactId>sissi-templates</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>module-templates</artifactId> <artifactId>module-templates</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>module-templates</artifactId> <artifactId>module-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>templates</artifactId> <artifactId>templates</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>template-overrides</artifactId> <artifactId>template-overrides</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>template-overrides</artifactId> <artifactId>template-overrides</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>template-overrides</artifactId> <artifactId>template-overrides</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>sissi-templates</artifactId> <artifactId>sissi-templates</artifactId>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>template-overrides</artifactId> <artifactId>template-overrides</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>customization-translations</artifactId> <artifactId>customization-translations</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>sissi-translations</artifactId> <artifactId>sissi-translations</artifactId>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>module-translations</artifactId> <artifactId>module-translations</artifactId>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>module-translations</artifactId> <artifactId>module-translations</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -1 +1 @@
New time of the meetup (https://www.unixtimestamp.com/) New time of the meetup (https://www.unixtimestamp.com/) or use @time: <time>

View File

@@ -1 +1 @@
Time of the meetup (https://www.unixtimestamp.com/) Time of the meetup (https://www.unixtimestamp.com/) or use @time: <time>

View File

@@ -4,7 +4,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>module-translations</artifactId> <artifactId>module-translations</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<artifactId>miepscord-translations</artifactId> <artifactId>miepscord-translations</artifactId>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>sissi-translations</artifactId> <artifactId>sissi-translations</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>module-translations</artifactId> <artifactId>module-translations</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>module-translations</artifactId> <artifactId>module-translations</artifactId>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates</groupId> <groupId>dev.sheldan.sissi.templates</groupId>
<artifactId>templates</artifactId> <artifactId>templates</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId> <groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
<artifactId>translation-overrides</artifactId> <artifactId>translation-overrides</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId> <groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
<artifactId>translation-overrides</artifactId> <artifactId>translation-overrides</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId> <groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
<artifactId>translation-overrides</artifactId> <artifactId>translation-overrides</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations.overrides</groupId> <groupId>dev.sheldan.sissi.templates.translations.overrides</groupId>
<artifactId>translation-overrides</artifactId> <artifactId>translation-overrides</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@@ -1,9 +1,11 @@
Du wurdest vom Server ${serverName} wegen `${reason}` gebannt. Du wurdest vom Server ${serverName} wegen `${reason}` gebannt.
When du das beeinspruchen willst, folge bitte dieser Einladung: https://discord.gg/qdH3rJDVrv und ANTWORTE AUF DIESE NACHRICHT MIT EINER TEXT NACHRICHT. Die Mods werden dir dann antworten. When du das beeinspruchen willst, folge bitte dieser Einladung: https://discord.gg/qdH3rJDVrv und ANTWORTE AUF DIESE NACHRICHT MIT EINER TEXT NACHRICHT.
Die Mods werden dir dann antworten. Falls du wegen honeypot gebannt wurdest: Dies ist eine Rolle beim onboarding und da steht daneben, dass man gebannt wird. Melde dich dennoch bei den Mods.
Du musst dich in 'Austria Appeal Server' befinden, damit du dem Bot schreiben kannst. Du musst dich in 'Austria Appeal Server' befinden, damit du dem Bot schreiben kannst.
Wenn der Einspruch abgelehnt wird, wirst du vom Server entfernt. Wenn der Einspruch abgelehnt wird, wirst du vom Server entfernt.
You were banned from the server ${serverName} for `${reason}`. You were banned from the server ${serverName} for `${reason}`.
If you want to appeal, join the server https://discord.gg/qdH3rJDVrv and then message this bot, this opens up a modmail. If you want to appeal, join the server https://discord.gg/qdH3rJDVrv and then message this bot, this opens up a modmail.
If you were banned for the reason of honeypot: this is related to an option you selected during onboarding that specifically says that you get banned upon selection. Contact the mods anyway if you want.
Joining the server is necessary in order to make communication to the bot possible. Joining the server is necessary in order to make communication to the bot possible.
If the appeal is denied, you will be banned from the above-mentioned server. If the appeal is denied, you will be banned from the above-mentioned server.

View File

@@ -3,7 +3,7 @@
<parent> <parent>
<groupId>dev.sheldan.sissi.templates.translations</groupId> <groupId>dev.sheldan.sissi.templates.translations</groupId>
<artifactId>sissi-translations</artifactId> <artifactId>sissi-translations</artifactId>
<version>1.5.17-SNAPSHOT</version> <version>1.5.23-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>