mirror of
https://github.com/Sheldan/Sissi.git
synced 2026-01-07 01:38:27 +00:00
Compare commits
24 Commits
sissi-1.4.
...
sissi-1.4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4f740fcf6 | ||
|
|
dda7ed7db8 | ||
|
|
af006ee880 | ||
|
|
125febc02a | ||
|
|
13f92247cf | ||
|
|
79ed55d988 | ||
|
|
7bc04a7906 | ||
|
|
89d743987d | ||
|
|
32ddd4e6f0 | ||
|
|
68afc31b2e | ||
|
|
d0ba46c440 | ||
|
|
554d197ca4 | ||
|
|
8826796fcb | ||
|
|
c8ed0e2195 | ||
|
|
25d19bfa26 | ||
|
|
f7e19b580e | ||
|
|
5f6bd0d88e | ||
|
|
a110c54411 | ||
|
|
a4a729dfc2 | ||
|
|
85eee4835f | ||
|
|
cab11140fa | ||
|
|
5854ca2ba7 | ||
|
|
3f613eeddf | ||
|
|
5fda777a62 |
4
.env
4
.env
@@ -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.4.51
|
VERSION=1.4.56
|
||||||
ABSTRACTO_VERSION=1.5.35
|
ABSTRACTO_VERSION=1.5.38
|
||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>executable</artifactId>
|
<artifactId>executable</artifactId>
|
||||||
@@ -55,12 +55,13 @@
|
|||||||
<artifactId>metrics-impl</artifactId>
|
<artifactId>metrics-impl</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- modules containing commands -->
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dev.sheldan.abstracto.scheduling</groupId>
|
<groupId>dev.sheldan.abstracto.scheduling</groupId>
|
||||||
<artifactId>scheduling-impl</artifactId>
|
<artifactId>scheduling-impl</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- modules containing commands -->
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
<artifactId>link-embed-impl</artifactId>
|
<artifactId>link-embed-impl</artifactId>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>image-generation-custom</artifactId>
|
<artifactId>image-generation-custom</artifactId>
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,21 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi.application</groupId>
|
<groupId>dev.sheldan.sissi.application</groupId>
|
||||||
<artifactId>sissi-modules</artifactId>
|
<artifactId>sissi-modules</artifactId>
|
||||||
<version>1.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>dev.sheldan.sissi.application.module</groupId>
|
<groupId>dev.sheldan.sissi.application.module</groupId>
|
||||||
<artifactId>quotes</artifactId>
|
<artifactId>quotes</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
|
<artifactId>starboard-int</artifactId>
|
||||||
|
<version>${abstracto.version}</version>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import lombok.Getter;
|
|||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum QuotesFeatureDefinition implements FeatureDefinition {
|
public enum QuotesFeatureDefinition implements FeatureDefinition {
|
||||||
QUOTES("quotes");
|
QUOTES("quotes"), STARBOARD_QUOTE_SYNC("starboardQuoteSync");
|
||||||
|
|
||||||
private String key;
|
private String key;
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package dev.sheldan.sissi.module.quotes.config;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureConfig;
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
public class StarboardQuoteSyncFeatureConfig implements FeatureConfig {
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return QuotesFeatureDefinition.STARBOARD_QUOTE_SYNC;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package dev.sheldan.sissi.module.quotes.listener;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.listener.DefaultListenerResult;
|
||||||
|
import dev.sheldan.abstracto.core.service.MessageService;
|
||||||
|
import dev.sheldan.abstracto.starboard.listener.StarboardPostCreatedListener;
|
||||||
|
import dev.sheldan.abstracto.starboard.model.StarboardPostCreatedModel;
|
||||||
|
import dev.sheldan.sissi.module.quotes.config.QuotesFeatureDefinition;
|
||||||
|
import dev.sheldan.sissi.module.quotes.service.QuoteServiceBean;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import net.dv8tion.jda.api.entities.Message;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class StarboardPostCreatedListenerBean implements StarboardPostCreatedListener {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MessageService messageService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QuoteServiceBean quoteServiceBean;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private StarboardPostCreatedListenerBean self;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DefaultListenerResult execute(StarboardPostCreatedModel model) {
|
||||||
|
Long serverId = model.getServerId();
|
||||||
|
Long starboardPostId = model.getStarboardPostId();
|
||||||
|
messageService.loadMessage(serverId, model.getStarredMessage().getChannelId(), model.getStarredMessage().getMessageId())
|
||||||
|
.thenAccept(message -> self.storeQuote(message, model))
|
||||||
|
.exceptionally(throwable -> {
|
||||||
|
log.error("Failed to persist quote for starboard post {} in server {}.", starboardPostId, serverId, throwable);
|
||||||
|
return null;
|
||||||
|
});
|
||||||
|
return DefaultListenerResult.PROCESSED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Transactional
|
||||||
|
public void storeQuote(Message message, StarboardPostCreatedModel model) {
|
||||||
|
log.info("Creating quote from starboard post {} in server {} from user {} because of user {}.", model.getStarboardPostId(), model.getServerId(),
|
||||||
|
model.getStarredUser().getUserId(), model.getLastStarrer().getUserId());
|
||||||
|
quoteServiceBean.createQuote(model.getStarredUser(), model.getLastStarrer(), message);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return QuotesFeatureDefinition.STARBOARD_QUOTE_SYNC;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package dev.sheldan.sissi.module.quotes.listener;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.config.FeatureDefinition;
|
||||||
|
import dev.sheldan.abstracto.core.listener.DefaultListenerResult;
|
||||||
|
import dev.sheldan.abstracto.starboard.listener.StarboardPostDeletedListener;
|
||||||
|
import dev.sheldan.abstracto.starboard.model.StarboardPostDeletedModel;
|
||||||
|
import dev.sheldan.sissi.module.quotes.config.QuotesFeatureDefinition;
|
||||||
|
import dev.sheldan.sissi.module.quotes.service.QuoteServiceBean;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class StarboardPostDeletedListenerBean implements StarboardPostDeletedListener {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QuoteServiceBean quoteServiceBean;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DefaultListenerResult execute(StarboardPostDeletedModel model) {
|
||||||
|
log.info("Handling delete of starboard post {}, causing the quote of message {} in server {} to be deleted.", model.getStarboardPostId(), model.getStarredMessage().getMessageId(), model.getServerId());
|
||||||
|
quoteServiceBean.deleteByMessageId(model.getStarredMessage().getMessageId());
|
||||||
|
return DefaultListenerResult.PROCESSED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureDefinition getFeature() {
|
||||||
|
return QuotesFeatureDefinition.STARBOARD_QUOTE_SYNC;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -21,12 +21,12 @@ import java.util.List;
|
|||||||
@EqualsAndHashCode
|
@EqualsAndHashCode
|
||||||
public class Quote {
|
public class Quote {
|
||||||
|
|
||||||
@EmbeddedId
|
@Id
|
||||||
@Getter
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
private ServerSpecificId id;
|
@Column(name = "id", nullable = false)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
@ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY)
|
@ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY)
|
||||||
@MapsId("serverId")
|
|
||||||
@JoinColumn(name = "server_id", nullable = false)
|
@JoinColumn(name = "server_id", nullable = false)
|
||||||
private AServer server;
|
private AServer server;
|
||||||
|
|
||||||
@@ -58,9 +58,9 @@ public class Quote {
|
|||||||
@Column(name = "text")
|
@Column(name = "text")
|
||||||
private String text;
|
private String text;
|
||||||
|
|
||||||
@Column(name = "created")
|
@Column(name = "created", insertable = false, updatable = false)
|
||||||
private Instant created;
|
private Instant created;
|
||||||
|
|
||||||
@Column(name = "updated")
|
@Column(name = "updated", insertable = false, updatable = false)
|
||||||
private Instant updated;
|
private Instant updated;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package dev.sheldan.sissi.module.quotes.model.database;
|
package dev.sheldan.sissi.module.quotes.model.database;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||||
import lombok.*;
|
import lombok.*;
|
||||||
|
|
||||||
import jakarta.persistence.*;
|
import jakarta.persistence.*;
|
||||||
@@ -16,7 +17,7 @@ public class QuoteAttachment {
|
|||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@Column(name = "id", nullable = false)
|
@Column(name = "id", nullable = false)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@@ -25,8 +26,7 @@ public class QuoteAttachment {
|
|||||||
@ManyToOne(fetch = FetchType.LAZY)
|
@ManyToOne(fetch = FetchType.LAZY)
|
||||||
@JoinColumns(
|
@JoinColumns(
|
||||||
{
|
{
|
||||||
@JoinColumn(updatable = false, insertable = false, name = "quote_id", referencedColumnName = "id"),
|
@JoinColumn(updatable = false, name = "quote_id", referencedColumnName = "id")
|
||||||
@JoinColumn(updatable = false, insertable = false, name = "server_id", referencedColumnName = "server_id")
|
|
||||||
})
|
})
|
||||||
private Quote quote;
|
private Quote quote;
|
||||||
|
|
||||||
@@ -35,6 +35,10 @@ public class QuoteAttachment {
|
|||||||
@Column(name = "url", nullable = false)
|
@Column(name = "url", nullable = false)
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
|
@ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, fetch = FetchType.LAZY)
|
||||||
|
@JoinColumn(name = "server_id", nullable = false)
|
||||||
|
private AServer server;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
@Column(name = "is_image", nullable = false)
|
@Column(name = "is_image", nullable = false)
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package dev.sheldan.sissi.module.quotes.repository;
|
package dev.sheldan.sissi.module.quotes.repository;
|
||||||
|
|
||||||
import dev.sheldan.abstracto.core.models.ServerSpecificId;
|
|
||||||
import dev.sheldan.abstracto.core.models.database.AServer;
|
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||||
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
|
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
|
||||||
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
||||||
@@ -8,13 +7,16 @@ import org.springframework.data.jpa.repository.JpaRepository;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface QuoteRepository extends JpaRepository<Quote, ServerSpecificId> {
|
public interface QuoteRepository extends JpaRepository<Quote, Long> {
|
||||||
List<Quote> findByTextContainingAndServer(String text, AServer server);
|
List<Quote> findByTextContainingAndServer(String text, AServer server);
|
||||||
List<Quote> findByTextContainingAndServerAndAuthor(String text, AServer server, AUserInAServer author);
|
List<Quote> findByTextContainingAndServerAndAuthor(String text, AServer server, AUserInAServer author);
|
||||||
List<Quote> findByServer(AServer server);
|
List<Quote> findByServer(AServer server);
|
||||||
List<Quote> findByAuthor(AUserInAServer author);
|
List<Quote> findByAuthor(AUserInAServer author);
|
||||||
Long countByAuthor(AUserInAServer author);
|
Long countByAuthor(AUserInAServer author);
|
||||||
Long countByAdder(AUserInAServer adder);
|
Long countByAdder(AUserInAServer adder);
|
||||||
|
|
||||||
|
Optional<Quote> findByMessageId(Long messageId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package dev.sheldan.sissi.module.quotes.service;
|
package dev.sheldan.sissi.module.quotes.service;
|
||||||
|
|
||||||
import dev.sheldan.abstracto.core.models.ServerChannelMessage;
|
import dev.sheldan.abstracto.core.models.ServerChannelMessage;
|
||||||
import dev.sheldan.abstracto.core.models.ServerSpecificId;
|
import dev.sheldan.abstracto.core.models.ServerUser;
|
||||||
import dev.sheldan.abstracto.core.models.database.AServer;
|
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||||
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
|
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
|
||||||
import dev.sheldan.abstracto.core.service.ChannelService;
|
import dev.sheldan.abstracto.core.service.ChannelService;
|
||||||
@@ -16,11 +16,12 @@ import dev.sheldan.sissi.module.quotes.model.command.QuoteResponseModel;
|
|||||||
import dev.sheldan.sissi.module.quotes.model.command.QuoteStatsModel;
|
import dev.sheldan.sissi.module.quotes.model.command.QuoteStatsModel;
|
||||||
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
||||||
import dev.sheldan.sissi.module.quotes.model.database.QuoteAttachment;
|
import dev.sheldan.sissi.module.quotes.model.database.QuoteAttachment;
|
||||||
import dev.sheldan.sissi.module.quotes.repository.QuoteRepository;
|
import dev.sheldan.sissi.module.quotes.service.management.QuoteManagementService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.dv8tion.jda.api.entities.*;
|
import net.dv8tion.jda.api.entities.*;
|
||||||
import net.dv8tion.jda.api.entities.channel.Channel;
|
import net.dv8tion.jda.api.entities.channel.Channel;
|
||||||
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
|
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
@@ -35,9 +36,6 @@ import java.util.stream.Collectors;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class QuoteServiceBean {
|
public class QuoteServiceBean {
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private QuoteRepository quoteRepository;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MemberService memberService;
|
private MemberService memberService;
|
||||||
|
|
||||||
@@ -56,11 +54,14 @@ public class QuoteServiceBean {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ChannelService channelService;
|
private ChannelService channelService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QuoteManagementService quoteManagementService;
|
||||||
|
|
||||||
private static final String QUOTE_RESPONSE_TEMPLATE_KEY = "quote_response";
|
private static final String QUOTE_RESPONSE_TEMPLATE_KEY = "quote_response";
|
||||||
|
|
||||||
public Optional<Quote> getRandomQuoteForMember(AUserInAServer aUserInAServer) {
|
public Optional<Quote> getRandomQuoteForMember(AUserInAServer aUserInAServer) {
|
||||||
// not nice, but good enough for now
|
// not nice, but good enough for now
|
||||||
List<Quote> allQuotes = quoteRepository.findByAuthor(aUserInAServer);
|
List<Quote> allQuotes = quoteManagementService.getFromAuthor(aUserInAServer);
|
||||||
if(allQuotes.isEmpty()) {
|
if(allQuotes.isEmpty()) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
@@ -69,7 +70,7 @@ public class QuoteServiceBean {
|
|||||||
|
|
||||||
public Optional<Quote> getRandomQuote(AServer server) {
|
public Optional<Quote> getRandomQuote(AServer server) {
|
||||||
// not nice, but good enough for now
|
// not nice, but good enough for now
|
||||||
List<Quote> allQuotes = quoteRepository.findByServer(server);
|
List<Quote> allQuotes = quoteManagementService.getFromServer(server);
|
||||||
if(allQuotes.isEmpty()) {
|
if(allQuotes.isEmpty()) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
@@ -79,7 +80,7 @@ public class QuoteServiceBean {
|
|||||||
public void deleteQuote(Long quoteId, AServer server) {
|
public void deleteQuote(Long quoteId, AServer server) {
|
||||||
Optional<Quote> existingQuote = getQuote(quoteId, server);
|
Optional<Quote> existingQuote = getQuote(quoteId, server);
|
||||||
if(existingQuote.isPresent()) {
|
if(existingQuote.isPresent()) {
|
||||||
quoteRepository.delete(existingQuote.get());
|
quoteManagementService.deleteQuote(existingQuote.get());
|
||||||
log.info("Deleting quote with id {} in server {}.", quoteId, server.getId());
|
log.info("Deleting quote with id {} in server {}.", quoteId, server.getId());
|
||||||
} else {
|
} else {
|
||||||
throw new QuoteNotFoundException();
|
throw new QuoteNotFoundException();
|
||||||
@@ -87,9 +88,8 @@ public class QuoteServiceBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Optional<Quote> getQuote(Long quoteId, AServer server) {
|
public Optional<Quote> getQuote(Long quoteId, AServer server) {
|
||||||
ServerSpecificId id = new ServerSpecificId(server.getId(), quoteId);
|
|
||||||
log.info("Loading quote with id {} in server {}.", quoteId, server.getId());
|
log.info("Loading quote with id {} in server {}.", quoteId, server.getId());
|
||||||
return quoteRepository.findById(id);
|
return quoteManagementService.getQuote(quoteId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public CompletableFuture<MessageToSend> renderQuoteToMessageToSend(Quote quote) {
|
public CompletableFuture<MessageToSend> renderQuoteToMessageToSend(Quote quote) {
|
||||||
@@ -118,7 +118,7 @@ public class QuoteServiceBean {
|
|||||||
.builder()
|
.builder()
|
||||||
.quoteContent(quote.getText())
|
.quoteContent(quote.getText())
|
||||||
.imageAttachmentURLs(imageAttachments)
|
.imageAttachmentURLs(imageAttachments)
|
||||||
.quoteId(quote.getId().getId())
|
.quoteId(quote.getId())
|
||||||
.fileAttachmentURLs(fileAttachments)
|
.fileAttachmentURLs(fileAttachments)
|
||||||
.creationDate(quote.getCreated())
|
.creationDate(quote.getCreated())
|
||||||
.quotedMessage(quotedMessage);
|
.quotedMessage(quotedMessage);
|
||||||
@@ -209,7 +209,7 @@ public class QuoteServiceBean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Optional<Quote> searchQuote(String query, AServer server) {
|
public Optional<Quote> searchQuote(String query, AServer server) {
|
||||||
List<Quote> foundQuotes = quoteRepository.findByTextContainingAndServer(query, server);
|
List<Quote> foundQuotes = quoteManagementService.getQuotesWithTextInServer(query, server);
|
||||||
if(foundQuotes.isEmpty()) {
|
if(foundQuotes.isEmpty()) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@ public class QuoteServiceBean {
|
|||||||
|
|
||||||
public Optional<Quote> searchQuote(String query, AServer server, Member targetMember) {
|
public Optional<Quote> searchQuote(String query, AServer server, Member targetMember) {
|
||||||
AUserInAServer author = userInServerManagementService.loadOrCreateUser(targetMember);
|
AUserInAServer author = userInServerManagementService.loadOrCreateUser(targetMember);
|
||||||
List<Quote> foundQuotes = quoteRepository.findByTextContainingAndServerAndAuthor(query, server, author);
|
List<Quote> foundQuotes = quoteManagementService.getQuotesWithTextInServerFromAuthor(query, server, author);
|
||||||
if(foundQuotes.isEmpty()) {
|
if(foundQuotes.isEmpty()) {
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
}
|
}
|
||||||
@@ -242,8 +242,8 @@ public class QuoteServiceBean {
|
|||||||
return getQuoteStats(user, member);
|
return getQuoteStats(user, member);
|
||||||
}
|
}
|
||||||
public QuoteStatsModel getQuoteStats(AUserInAServer user, Member member) {
|
public QuoteStatsModel getQuoteStats(AUserInAServer user, Member member) {
|
||||||
Long authored = quoteRepository.countByAuthor(user);
|
Long authored = quoteManagementService.getAmountOfQuotesOfAuthor(user);
|
||||||
Long added = quoteRepository.countByAdder(user);
|
Long added = quoteManagementService.getAmountOfQuotesOfAdder(user);
|
||||||
return QuoteStatsModel
|
return QuoteStatsModel
|
||||||
.builder()
|
.builder()
|
||||||
.quoteCount(added)
|
.quoteCount(added)
|
||||||
@@ -253,4 +253,21 @@ public class QuoteServiceBean {
|
|||||||
.serverId(user.getServerReference().getId())
|
.serverId(user.getServerReference().getId())
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Quote createQuote(ServerUser authorUser, ServerUser adderUser, Message quoteMessage) {
|
||||||
|
AUserInAServer author = userInServerManagementService.loadOrCreateUser(authorUser);
|
||||||
|
AUserInAServer adder = userInServerManagementService.loadOrCreateUser(adderUser);
|
||||||
|
List<Pair<String, Boolean>> attachments = quoteMessage
|
||||||
|
.getAttachments()
|
||||||
|
.stream()
|
||||||
|
.map(attachment -> Pair.of(attachment.getProxyUrl(), attachment.isImage()))
|
||||||
|
.toList();
|
||||||
|
return quoteManagementService.createQuote(author, adder, quoteMessage.getContentDisplay(), ServerChannelMessage.fromMessage(quoteMessage), attachments);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteByMessageId(Long messageId) {
|
||||||
|
Quote quote = quoteManagementService.findByMessage(messageId).orElseThrow(QuoteNotFoundException::new);
|
||||||
|
log.info("Deleting quote {} in server {}.", quote.getId(), quote.getServer().getId());
|
||||||
|
quoteManagementService.deleteQuote(quote);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package dev.sheldan.sissi.module.quotes.service.management;
|
||||||
|
|
||||||
|
import dev.sheldan.abstracto.core.models.ServerChannelMessage;
|
||||||
|
import dev.sheldan.abstracto.core.models.database.AChannel;
|
||||||
|
import dev.sheldan.abstracto.core.models.database.AServer;
|
||||||
|
import dev.sheldan.abstracto.core.models.database.AUserInAServer;
|
||||||
|
import dev.sheldan.abstracto.core.service.management.ChannelManagementService;
|
||||||
|
import dev.sheldan.sissi.module.quotes.model.database.Quote;
|
||||||
|
import dev.sheldan.sissi.module.quotes.model.database.QuoteAttachment;
|
||||||
|
import dev.sheldan.sissi.module.quotes.repository.QuoteRepository;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.lang3.tuple.Pair;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
@Component
|
||||||
|
@Slf4j
|
||||||
|
public class QuoteManagementService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private QuoteRepository quoteRepository;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ChannelManagementService channelManagementService;
|
||||||
|
|
||||||
|
public Quote createQuote(AUserInAServer author, AUserInAServer adder, String messageText, ServerChannelMessage quotedMessage, List<Pair<String, Boolean>> attachments) {
|
||||||
|
AChannel channel = channelManagementService.loadChannel(quotedMessage.getChannelId());
|
||||||
|
|
||||||
|
Quote quote = Quote
|
||||||
|
.builder()
|
||||||
|
.adder(adder)
|
||||||
|
.author(author)
|
||||||
|
.text(messageText)
|
||||||
|
.messageId(quotedMessage.getMessageId())
|
||||||
|
.server(adder.getServerReference())
|
||||||
|
.sourceChannel(channel)
|
||||||
|
.build();
|
||||||
|
List<QuoteAttachment> quoteAttachments = attachments
|
||||||
|
.stream()
|
||||||
|
.map(stringBooleanPair -> QuoteAttachment
|
||||||
|
.builder()
|
||||||
|
.url(stringBooleanPair.getLeft())
|
||||||
|
.quote(quote)
|
||||||
|
.server(adder.getServerReference())
|
||||||
|
.isImage(stringBooleanPair.getRight())
|
||||||
|
.build())
|
||||||
|
.toList();
|
||||||
|
|
||||||
|
log.info("Creating quote from {} added by {} in server {}.", author.getUserReference().getId(), adder.getUserReference().getId(), author.getServerReference().getId());
|
||||||
|
|
||||||
|
quote.setAttachments(quoteAttachments);
|
||||||
|
|
||||||
|
return quoteRepository.save(quote);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Quote> getFromAuthor(AUserInAServer author) {
|
||||||
|
return quoteRepository.findByAuthor(author);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Quote> getFromServer(AServer aServer) {
|
||||||
|
return quoteRepository.findByServer(aServer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void deleteQuote(Quote quote) {
|
||||||
|
quoteRepository.delete(quote);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Optional<Quote> getQuote(Long quoteId) {
|
||||||
|
return quoteRepository.findById(quoteId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Quote> getQuotesWithTextInServer(String text, AServer server) {
|
||||||
|
return quoteRepository.findByTextContainingAndServer(text, server);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Quote> getQuotesWithTextInServerFromAuthor(String text, AServer server, AUserInAServer aUserInAServer) {
|
||||||
|
return quoteRepository.findByTextContainingAndServerAndAuthor(text, server, aUserInAServer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAmountOfQuotesOfAuthor(AUserInAServer aUserInAServer) {
|
||||||
|
return quoteRepository.countByAuthor(aUserInAServer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getAmountOfQuotesOfAdder(AUserInAServer aUserInAServer) {
|
||||||
|
return quoteRepository.countByAdder(aUserInAServer);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Optional<Quote> findByMessage(Long messageId) {
|
||||||
|
return quoteRepository.findByMessageId(messageId);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
|
<include file="seedData/data.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
|
<include file="feature.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
|
<changeSet author="Sheldan" id="starboard_quote_sync_feature-insertion">
|
||||||
|
<insert tableName="feature">
|
||||||
|
<column name="key" value="starboardQuoteSync"/>
|
||||||
|
</insert>
|
||||||
|
</changeSet>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
|
<changeSet author="Sheldan" id="quote-add_tracking_columns">
|
||||||
|
<sql>
|
||||||
|
DROP TRIGGER IF EXISTS quote_update_trigger ON quote;
|
||||||
|
CREATE TRIGGER quote_update_trigger BEFORE UPDATE ON quote FOR EACH ROW EXECUTE PROCEDURE update_trigger_procedure();
|
||||||
|
</sql>
|
||||||
|
<sql>
|
||||||
|
DROP TRIGGER IF EXISTS quote_insert_trigger ON quote;
|
||||||
|
CREATE TRIGGER quote_insert_trigger BEFORE INSERT ON quote FOR EACH ROW EXECUTE PROCEDURE insert_trigger_procedure();
|
||||||
|
</sql>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
|
<include file="quote.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
|
<include file="tables/tables.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
|
<changeSet author="Sheldan" id="quote_attachment-longer_attachment_url">
|
||||||
|
<modifyDataType columnName="url"
|
||||||
|
newDataType="VARCHAR(4096)"
|
||||||
|
tableName="quote_attachment"/>
|
||||||
|
</changeSet>
|
||||||
|
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.1" encoding="UTF-8" standalone="no"?>
|
||||||
|
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
|
<include file="quote_attachment.xml" relativeToChangelogFile="true"/>
|
||||||
|
</databaseChangeLog>
|
||||||
@@ -3,4 +3,6 @@
|
|||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog https://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.26.xsd" >
|
||||||
<include file="1.0.2/collection.xml" relativeToChangelogFile="true"/>
|
<include file="1.0.2/collection.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="1.4.56/collection.xml" relativeToChangelogFile="true"/>
|
||||||
|
<include file="1.4.57/collection.xml" relativeToChangelogFile="true"/>
|
||||||
</databaseChangeLog>
|
</databaseChangeLog>
|
||||||
@@ -1,2 +1,5 @@
|
|||||||
abstracto.featureFlags.quotes.featureName=quotes
|
abstracto.featureFlags.quotes.featureName=quotes
|
||||||
abstracto.featureFlags.quotes.enabled=false
|
abstracto.featureFlags.quotes.enabled=false
|
||||||
|
|
||||||
|
abstracto.featureFlags.starboardQuoteSync.featureName=starboardQuoteSync
|
||||||
|
abstracto.featureFlags.starboardQuoteSync.enabled=false
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.51
|
version: 1.4.56
|
||||||
|
|||||||
@@ -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.4.51
|
tag: 1.4.56
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
initialDelaySeconds: 60
|
initialDelaySeconds: 60
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
@@ -14,13 +14,13 @@ bot:
|
|||||||
failureThreshold: 3
|
failureThreshold: 3
|
||||||
propertyConfig:
|
propertyConfig:
|
||||||
hikariPoolSize: 10
|
hikariPoolSize: 10
|
||||||
host:
|
host: null
|
||||||
restApi:
|
restApi:
|
||||||
enabled: true
|
enabled: true
|
||||||
repository: harbor.sheldan.dev/sissi
|
repository: harbor.sheldan.dev/sissi
|
||||||
pullPolicy: Always
|
pullPolicy: Always
|
||||||
image: sissi-rest-api
|
image: sissi-rest-api
|
||||||
tag: 1.4.51
|
tag: 1.4.56
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
securityContext: {}
|
securityContext: {}
|
||||||
@@ -60,7 +60,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.4.51
|
tag: 1.4.56
|
||||||
podAnnotations: {}
|
podAnnotations: {}
|
||||||
podSecurityContext: {}
|
podSecurityContext: {}
|
||||||
securityContext: {}
|
securityContext: {}
|
||||||
@@ -91,23 +91,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.5.35
|
tag: 1.5.38
|
||||||
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.4.51
|
tag: 1.4.56
|
||||||
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.5.35
|
tag: 1.5.38
|
||||||
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.4.51
|
tag: 1.4.56
|
||||||
dbCredentials:
|
dbCredentials:
|
||||||
host: null
|
host: null
|
||||||
port: null
|
port: null
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>deployment</artifactId>
|
<artifactId>deployment</artifactId>
|
||||||
<version>1.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -631,17 +631,6 @@
|
|||||||
<destFileName>assignable-roles.zip</destFileName>
|
<destFileName>assignable-roles.zip</destFileName>
|
||||||
</artifactItem>
|
</artifactItem>
|
||||||
|
|
||||||
<artifactItem>
|
|
||||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
|
||||||
<artifactId>utility-impl</artifactId>
|
|
||||||
<version>${abstracto.version}</version>
|
|
||||||
<classifier>liquibase</classifier>
|
|
||||||
<type>zip</type>
|
|
||||||
<overWrite>true</overWrite>
|
|
||||||
<outputDirectory>${file.basedir}/db-data/liquibase-artifacts/</outputDirectory>
|
|
||||||
<destFileName>utility.zip</destFileName>
|
|
||||||
</artifactItem>
|
|
||||||
|
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
<groupId>dev.sheldan.abstracto.modules</groupId>
|
<groupId>dev.sheldan.abstracto.modules</groupId>
|
||||||
<artifactId>modmail-impl</artifactId>
|
<artifactId>modmail-impl</artifactId>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -44,4 +44,4 @@ services:
|
|||||||
template-data:
|
template-data:
|
||||||
build:
|
build:
|
||||||
context: deployment/image-packaging/src/main/docker/template-data
|
context: deployment/image-packaging/src/main/docker/template-data
|
||||||
image: ${REGISTRY_PREFIX}sissi-template-data:${VERSION:-latest}
|
image: ${REGISTRY_PREFIX}sissi-template-data:${VERSION:-latest}
|
||||||
|
|||||||
8
pom.xml
8
pom.xml
@@ -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.4.52</version>
|
<version>1.4.57</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.5.35</abstracto.version>
|
<abstracto.version>1.5.38</abstracto.version>
|
||||||
<abstracto.templates.version>1.4.36</abstracto.templates.version>
|
<abstracto.templates.version>1.4.38</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>
|
||||||
</properties>
|
</properties>
|
||||||
@@ -72,7 +72,7 @@
|
|||||||
<connection>scm:git:${project.scm.url}</connection>
|
<connection>scm:git:${project.scm.url}</connection>
|
||||||
<developerConnection>scm:git:${project.scm.url}</developerConnection>
|
<developerConnection>scm:git:${project.scm.url}</developerConnection>
|
||||||
<url>https://github.com/Sheldan/Sissi.git</url>
|
<url>https://github.com/Sheldan/Sissi.git</url>
|
||||||
<tag>sissi-1.4.52</tag>
|
<tag>sissi-1.4.57</tag>
|
||||||
</scm>
|
</scm>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
30
python/tools/migrations/quotes-starboard-import/main.py
Normal file
30
python/tools/migrations/quotes-starboard-import/main.py
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import sqlalchemy as db
|
||||||
|
import os
|
||||||
|
from starboard_loader import load_all_starboard_posts
|
||||||
|
from post_loader import enrich_posts
|
||||||
|
from quote_importer import import_quotes, fix_quote_created
|
||||||
|
|
||||||
|
db_host = os.getenv('DB_HOST')
|
||||||
|
db_port = os.getenv('DB_PORT')
|
||||||
|
db_database = os.getenv('DB_NAME')
|
||||||
|
db_user = os.getenv('DB_USER')
|
||||||
|
db_password = os.getenv('DB_PASS')
|
||||||
|
|
||||||
|
engine = db.create_engine('postgresql://%s:%s@%s:%s/%s' % (db_user, db_password, db_host, db_port, db_database))
|
||||||
|
|
||||||
|
with engine.connect() as con:
|
||||||
|
posts = load_all_starboard_posts(con)
|
||||||
|
sub_posts = chunks = [posts[x:x+100] for x in range(0, len(posts), 100)]
|
||||||
|
print(f'Loaded {len(posts)} into {len(sub_posts)} partitions')
|
||||||
|
counter = 0
|
||||||
|
for sub_post in sub_posts:
|
||||||
|
print(f'Partition size {len(sub_post)}')
|
||||||
|
enriched_posts = enrich_posts(sub_post)
|
||||||
|
print(f'Enriched posts')
|
||||||
|
import_quotes(enriched_posts, con)
|
||||||
|
print(f'Done storing quotes')
|
||||||
|
con.commit()
|
||||||
|
fix_quote_created(enriched_posts, con)
|
||||||
|
con.commit()
|
||||||
|
counter += 1
|
||||||
|
print(f'Done. {counter}')
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
import requests
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
import time
|
||||||
|
|
||||||
|
token = os.getenv('TOKEN')
|
||||||
|
|
||||||
|
image_extension = ["jpg", "jpeg", "png", "gif", "webp", "tiff", "svg", "apng"]
|
||||||
|
|
||||||
|
def enrich_posts(posts):
|
||||||
|
for post in posts:
|
||||||
|
print(f"Loading post {post['message_id']}")
|
||||||
|
url = f"https://discord.com/api/v10/channels/{post['channel_id']}/messages/{post['message_id']}"
|
||||||
|
message = requests.get(url, headers={'Authorization': token})
|
||||||
|
time.sleep(0.5)
|
||||||
|
if message.status_code == 200:
|
||||||
|
message_obj = json.loads(message.content)
|
||||||
|
post['content'] = message_obj['content']
|
||||||
|
attachments = []
|
||||||
|
attachment_objs = message_obj['attachments']
|
||||||
|
if len(attachment_objs) > 0:
|
||||||
|
for attachment in attachment_objs:
|
||||||
|
extension = attachment['filename'][attachment['filename'].rfind('.') + 1]
|
||||||
|
attachment = {
|
||||||
|
'url': attachment['proxy_url'],
|
||||||
|
'is_image': extension.lower() in image_extension
|
||||||
|
}
|
||||||
|
attachments.append(attachment)
|
||||||
|
post['attachments'] = attachments
|
||||||
|
else:
|
||||||
|
print(f"{post['message_id']}: Didnt find post {url}: {message.status_code}")
|
||||||
|
return posts
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
from sqlalchemy.sql import text
|
||||||
|
|
||||||
|
def import_quotes(posts, con):
|
||||||
|
for post in posts:
|
||||||
|
if 'content' not in post:
|
||||||
|
print(f"Skipping {post['message_id']} because no content, did it fail?")
|
||||||
|
continue
|
||||||
|
print(f"Inserting {post['message_id']}")
|
||||||
|
statement = text("""INSERT INTO quote(author_user_in_server_id, adder_user_in_server_id, source_channel_id,
|
||||||
|
server_id, message_id, text, created)
|
||||||
|
VALUES(:author_id, :adder_id, :channel_id, :server_id, :message_id, :content, :created) returning id""")
|
||||||
|
quote_id = con.execute(statement, {'author_id': post['author_id'], 'adder_id': post['adder_id'], 'channel_id': post['channel_id'], 'server_id': post['server_id'],
|
||||||
|
'message_id': post['message_id'], 'content': post['content'], 'created': post['created']}).fetchone()[0]
|
||||||
|
print(f'Created quote {quote_id}')
|
||||||
|
for attachment in post['attachments']:
|
||||||
|
statement = text("""INSERT INTO quote_attachment(quote_id, server_id, url, is_image)
|
||||||
|
VALUES(:quote_id, :server_id, :url, :is_image)""")
|
||||||
|
con.execute(statement, {'quote_id': quote_id, 'server_id': post['server_id'], 'url': attachment['url'], 'is_image': attachment['is_image']})
|
||||||
|
post['quote_id'] = quote_id
|
||||||
|
|
||||||
|
# the insert trigger always updated created, we have to re-do it (will be changed, but not for now)
|
||||||
|
def fix_quote_created(posts, con):
|
||||||
|
for post in posts:
|
||||||
|
if 'quote_id' in post:
|
||||||
|
statement = text("""update quote set created = :created where id = :quote_id""")
|
||||||
|
con.execute(statement, {'created': post['created'], 'quote_id': post['quote_id']})
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
from sqlalchemy.sql import text
|
||||||
|
|
||||||
|
|
||||||
|
def load_all_starboard_posts(conn):
|
||||||
|
squery = text("""select distinct sp.id, sp.author_user_in_server_id, sp.source_channel_id, sp.server_id, sp.post_message_id, spr.reactor_user_in_server_id, sp.created
|
||||||
|
from starboard_post sp
|
||||||
|
inner join starboard_post_reaction spr
|
||||||
|
on sp.id = spr.post_id
|
||||||
|
and spr.reactor_user_in_server_id = (
|
||||||
|
select reactor_user_in_server_id
|
||||||
|
from starboard_post_reaction spr2
|
||||||
|
where spr2.post_id = sp.id
|
||||||
|
order by created limit 1
|
||||||
|
)
|
||||||
|
where sp.ignored = false
|
||||||
|
and sp.post_message_id not in (select message_id from quote)
|
||||||
|
""")
|
||||||
|
rs = conn.execute(squery)
|
||||||
|
found_posts = []
|
||||||
|
for post in rs:
|
||||||
|
found_posts.append({
|
||||||
|
'post_id': post[0],
|
||||||
|
'channel_id': post[2],
|
||||||
|
'message_id': post[4],
|
||||||
|
'adder_id': post[5],
|
||||||
|
'author_id': post[1],
|
||||||
|
'server_id': post[3],
|
||||||
|
'created': post[6]
|
||||||
|
})
|
||||||
|
return found_posts
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>dev.sheldan.sissi</groupId>
|
<groupId>dev.sheldan.sissi</groupId>
|
||||||
<artifactId>sissi</artifactId>
|
<artifactId>sissi</artifactId>
|
||||||
<version>1.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>image-generation-customization-templates</artifactId>
|
<artifactId>image-generation-customization-templates</artifactId>
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
<#assign userMentions><#list participants as user>${user.memberMention}<#sep>, </#list></#assign>
|
<#assign userMentions><#list participants as user>${user.memberMention}<#sep>, </#list></#assign>
|
||||||
"additionalMessage": "${userMentions?json_string}
|
"additionalMessage": "${userMentions?json_string}
|
||||||
${notificationMessage}"
|
${notificationMessage?json_string}"
|
||||||
<#if meetupMessageId??>,
|
<#if meetupMessageId??>,
|
||||||
"referencedMessageId": ${meetupMessageId?c}
|
"referencedMessageId": ${meetupMessageId?c}
|
||||||
</#if>
|
</#if>
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Quote-Starboard sync
|
||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,2 +1,9 @@
|
|||||||
|
Du wurdest vom Server ${serverName} wegen `${reason}` gebannt.
|
||||||
|
When du das beeinspruchen willst, folge bitte dieser Einladung: https://discord.gg/rXpBHEGXpE und ANTWORTE AUF DIESE NACHRICHT MIT EINER TEXT NACHRICHT. Die Mods werden dir dann antworten.
|
||||||
|
Du musst dich in 'Austria Appeal Server' befinden, damit du dem Bot schreiben kannst.
|
||||||
|
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, visit https://docs.google.com/forms/d/e/1FAIpQLSegsjW3OaHGZH_VZL6susvVPksLQ2jDWd3vzze6x9LyF4zdfg/viewform.
|
If you want to appeal, join the server https://discord.gg/rXpBHEGXpE and then message this bot, this opens up a modmail.
|
||||||
|
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.
|
||||||
@@ -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.4.52</version>
|
<version>1.4.57</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ dependencies:
|
|||||||
version: ">= 0.0.1"
|
version: ">= 0.0.1"
|
||||||
- name: postgresql
|
- name: postgresql
|
||||||
repository: oci://registry-1.docker.io/bitnamicharts
|
repository: oci://registry-1.docker.io/bitnamicharts
|
||||||
version: 12.12.10 # 13.x.x uses postgresql 16.x
|
version: 15.3.2
|
||||||
|
|||||||
Reference in New Issue
Block a user