diff --git a/api/user.go b/api/user.go index b7d39a7..0107f10 100644 --- a/api/user.go +++ b/api/user.go @@ -173,7 +173,7 @@ func parseSubmission(value gjson.Result) Submission { Url: strings.ReplaceAll(c.Get("url").String(), "https://i.imgur.com", ""), } // Replace with thumbnails here because it's easier. - if cover.Url[len(cover.Url)-3:] == "mp4" { + if strings.HasSuffix(cover.Url, ".mp4") { cover.Url = cover.Url[:len(cover.Url)-3] + "webp" } default: