[AB-101] adding random string to twitch stream preview image to invalidate cache

This commit is contained in:
Sheldan
2023-09-02 21:42:28 +02:00
parent 06ebf4c882
commit 2396bf300b
2 changed files with 3 additions and 0 deletions

View File

@@ -31,6 +31,7 @@ import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;
import net.dv8tion.jda.api.entities.Message;
import net.dv8tion.jda.api.entities.channel.middleman.GuildMessageChannel;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@@ -138,6 +139,7 @@ public class StreamerServiceBean implements StreamerService {
.mature(stream.isMature())
.currentSection(StreamSectionDisplay.fromStream(stream))
.streamerAvatarURL(streamerUser.getProfileImageUrl())
.randomString(RandomStringUtils.randomAlphabetic(15))
.streamURL(formatStreamUrl(stream.getUserName()))
.build();
MessageToSend messagetoSend;

View File

@@ -13,5 +13,6 @@ public class GoLiveNotificationModel {
private List<StreamSectionDisplay> pastSections;
private Boolean mature;
private String streamURL;
private String randomString;
private String streamerAvatarURL;
}