this repo has no description

fix: check for null pointers

Changed files
+1 -1
pkg
mostliked
+1 -1
pkg/mostliked/handler.go
···
if post.Text != "" {
return post.Text
-
} else if post.Embed.EmbedImages != nil {
+
} else if post.Embed != nil && post.Embed.EmbedImages != nil && post.Embed.EmbedImages.Images != nil {
for _, image := range post.Embed.EmbedImages.Images {
if image.Alt != "" {
return image.Alt