diff options
| author | default <nobody@localhost> | 2024-12-30 23:03:40 +0100 |
|---|---|---|
| committer | default <nobody@localhost> | 2024-12-30 23:03:40 +0100 |
| commit | 066ce9044912cb9aac66dd6b2be4b2300db922bc (patch) | |
| tree | fbb26fe36f59746d3a550100e7c726490b7e43c7 | |
| parent | 03b5954a02c392c1741a1b04920dbcd60f4c425a (diff) | |
Convert to lowercase when checking for followed hashtags.
| -rw-r--r-- | activitypub.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index 771bd8c..b0d5f01 100644 --- a/activitypub.c +++ b/activitypub.c @@ -10,6 +10,7 @@ #include "xs_time.h" #include "xs_set.h" #include "xs_match.h" +#include "xs_unicode.h" #include "snac.h" @@ -720,8 +721,12 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg) const char *name = xs_dict_get(te, "name"); if (xs_type(type) == XSTYPE_STRING && xs_type(name) == XSTYPE_STRING) { - if (strcmp(type, "Hashtag") == 0 && xs_list_in(fw_tags, name) != -1) - return 7; + if (strcmp(type, "Hashtag") == 0) { + xs *lc_name = xs_utf8_to_lower(name); + + if (xs_list_in(fw_tags, lc_name) != -1) + return 7; + } } } } |