Skip to content

Commit

Permalink
[AB-101] adding random string to twitch stream preview image to inval…
Browse files Browse the repository at this point in the history
…idate cache
  • Loading branch information
Sheldan committed Sep 2, 2023
1 parent 06ebf4c commit 2396bf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
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;
Expand Down Expand Up @@ -138,6 +139,7 @@ public CompletableFutureList<Message> notifyAboutOnlineStream(Stream stream, Str
.mature(stream.isMature())
.currentSection(StreamSectionDisplay.fromStream(stream))
.streamerAvatarURL(streamerUser.getProfileImageUrl())
.randomString(RandomStringUtils.randomAlphabetic(15))
.streamURL(formatStreamUrl(stream.getUserName()))
.build();
MessageToSend messagetoSend;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ public class GoLiveNotificationModel {
private List<StreamSectionDisplay> pastSections;
private Boolean mature;
private String streamURL;
private String randomString;
private String streamerAvatarURL;
}

0 comments on commit 2396bf3

Please sign in to comment.