mirror of
https://github.com/Luzifer/discord-community.git
synced 2024-11-09 23:50:04 +00:00
Lint: Handle URL parser error for stream previews
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9f164c43d3
commit
4fc3c692c4
1 changed files with 4 additions and 0 deletions
|
@ -235,6 +235,10 @@ func (m modLivePosting) sendLivePost(username, displayName, title, game, preview
|
||||||
"{height}", strconv.Itoa(livePostingPreviewHeight),
|
"{height}", strconv.Itoa(livePostingPreviewHeight),
|
||||||
).Replace(previewImage),
|
).Replace(previewImage),
|
||||||
)
|
)
|
||||||
|
if err != nil {
|
||||||
|
return errors.Wrap(err, "parsing stream preview URL")
|
||||||
|
}
|
||||||
|
|
||||||
previewImageQuery := previewImageURL.Query()
|
previewImageQuery := previewImageURL.Query()
|
||||||
previewImageQuery.Add("_discordNoCache", time.Now().Format(time.RFC3339))
|
previewImageQuery.Add("_discordNoCache", time.Now().Format(time.RFC3339))
|
||||||
previewImageURL.RawQuery = previewImageQuery.Encode()
|
previewImageURL.RawQuery = previewImageQuery.Encode()
|
||||||
|
|
Loading…
Reference in a new issue