diff --git a/patches/delete-invalid-avatars/delete-invalid-avatars.go b/patches/delete-invalid-avatars/delete-invalid-avatars.go new file mode 100644 index 00000000..58360437 --- /dev/null +++ b/patches/delete-invalid-avatars/delete-invalid-avatars.go @@ -0,0 +1,17 @@ +package main + +import ( + "strings" + + "github.com/animenotifier/arn" +) + +func main() { + for user := range arn.MustStreamUsers() { + if !strings.HasPrefix(user.AvatarExtension, ".") { + user.AvatarExtension = "" + } + + user.Save() + } +}