[AB-226] adding caching of referenced messages (only one element on the chain)

This commit is contained in:
Sheldan
2021-04-06 23:38:45 +02:00
parent dd97503238
commit c56a037d28
3 changed files with 24 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ public class CachedMessage {
private List<CachedAttachment> attachments;
private List<CachedReactions> reactions;
private List<CachedEmote> emotes;
private CachedMessage referencedMessage;
public String getMessageUrl() {
return MessageUtils.buildMessageUrl(this.serverId ,this.channelId, this.messageId);

View File

@@ -13,5 +13,6 @@ public interface CacheEntityService {
CachedThumbnail buildCachedThumbnail(MessageEmbed.Thumbnail thumbnail);
CachedImageInfo buildCachedImage(MessageEmbed.ImageInfo image);
CompletableFuture<CachedReactions> getCachedReactionFromReaction(MessageReaction reaction);
CompletableFuture<CachedMessage> buildCachedMessageFromMessage(Message message, boolean loadReferenced);
CompletableFuture<CachedMessage> buildCachedMessageFromMessage(Message message);
}