summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2024-12-30 23:03:40 +0100
committerGravatar default2024-12-30 23:03:40 +0100
commit066ce9044912cb9aac66dd6b2be4b2300db922bc (patch)
treefbb26fe36f59746d3a550100e7c726490b7e43c7 /activitypub.c
parentDon't search for hashtags in non-public posts. (diff)
downloadpenes-snac2-066ce9044912cb9aac66dd6b2be4b2300db922bc.tar.gz
penes-snac2-066ce9044912cb9aac66dd6b2be4b2300db922bc.tar.xz
penes-snac2-066ce9044912cb9aac66dd6b2be4b2300db922bc.zip
Convert to lowercase when checking for followed hashtags.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c9
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 @@
10#include "xs_time.h" 10#include "xs_time.h"
11#include "xs_set.h" 11#include "xs_set.h"
12#include "xs_match.h" 12#include "xs_match.h"
13#include "xs_unicode.h"
13 14
14#include "snac.h" 15#include "snac.h"
15 16
@@ -720,8 +721,12 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg)
720 const char *name = xs_dict_get(te, "name"); 721 const char *name = xs_dict_get(te, "name");
721 722
722 if (xs_type(type) == XSTYPE_STRING && xs_type(name) == XSTYPE_STRING) { 723 if (xs_type(type) == XSTYPE_STRING && xs_type(name) == XSTYPE_STRING) {
723 if (strcmp(type, "Hashtag") == 0 && xs_list_in(fw_tags, name) != -1) 724 if (strcmp(type, "Hashtag") == 0) {
724 return 7; 725 xs *lc_name = xs_utf8_to_lower(name);
726
727 if (xs_list_in(fw_tags, lc_name) != -1)
728 return 7;
729 }
725 } 730 }
726 } 731 }
727 } 732 }