Skip to content

Commit

Permalink
feat: fuzy forum tag matching
Browse files Browse the repository at this point in the history
  • Loading branch information
dd84ai committed Nov 21, 2023
1 parent 51a2757 commit 0016dfd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/forumer/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ func (v *Forumer) isPostMatchTags(channel types.DiscordChannelID, new_post *foru

do_we_show_this_post := false
for _, watch_tag := range watch_tags {
if strings.Contains(string(new_post.ThreadFullName), string(watch_tag)) {
if strings.Contains(string(new_post.ThreadFullName), string(watch_tag)) ||
strings.Contains(strings.ToLower(string(new_post.ThreadFullName)), strings.ToLower(string(watch_tag))) {
do_we_show_this_post = true
matched_tags = append(matched_tags, string(fmt.Sprintf(`"%s"`, watch_tag)))
}
Expand Down

0 comments on commit 0016dfd

Please sign in to comment.