This commit is contained in:
tobi 2024-09-15 16:23:03 +02:00
commit 2b5ff69db3

View file

@ -299,21 +299,21 @@ func StatusHash(s *gtsmodel.Status) string {
hash := xxhash.New() hash := xxhash.New()
// Content warning / title. // Content warning / title.
hash.WriteString(s.ContentWarning) hash.WriteString(s.ContentWarning) // nolint:errcheck
// Status content. // Status content.
hash.WriteString(s.Content) hash.WriteString(s.Content) // nolint:errcheck
// Media IDs + descriptions. // Media IDs + descriptions.
for _, attachment := range s.Attachments { for _, attachment := range s.Attachments {
hash.WriteString(attachment.ID) hash.WriteString(attachment.ID) // nolint:errcheck
hash.WriteString(attachment.Description) hash.WriteString(attachment.Description) // nolint:errcheck
} }
// Poll options. // Poll options.
if s.Poll != nil { if s.Poll != nil {
for _, option := range s.Poll.Options { for _, option := range s.Poll.Options {
hash.WriteString(option) hash.WriteString(option) // nolint:errcheck
} }
} }
@ -354,9 +354,7 @@ func filterableText(s *gtsmodel.Status) string {
// Poll options. // Poll options.
if s.Poll != nil { if s.Poll != nil {
for _, option := range s.Poll.Options { fields = append(fields, s.Poll.Options...)
fields = append(fields, option)
}
} }
return strings.Join(fields, " ") return strings.Join(fields, " ")