summaryrefslogtreecommitdiff
path: root/imp.ha
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2022-07-21 10:56:02 +0200
committerJulian Hurst <ark@mansus.space>2022-07-21 10:56:02 +0200
commit84c4042ac883ac5bdc0e281cbdceae864ca6eb75 (patch)
treeea5a094ed56b3295839d9dc395470ae2a164b126 /imp.ha
parent9fb207cc81aafd4c3ef6fa3fe1c265a05f46c24e (diff)
downloadimp-84c4042ac883ac5bdc0e281cbdceae864ca6eb75.tar.gz
Fix match (url) filter when there are (or not) trailing slashes
Diffstat (limited to 'imp.ha')
-rw-r--r--imp.ha4
1 files changed, 3 insertions, 1 deletions
diff --git a/imp.ha b/imp.ha
index 378fe73..1a5f7a4 100644
--- a/imp.ha
+++ b/imp.ha
@@ -178,7 +178,9 @@ fn isfiltered(acc: account, f: filter) bool = {
};
};
for (let i = 0z; i < len(f.urls); i += 1) {
- if (strings::compare(f.urls[i], acc.url) == 0) {
+ const url1 = strings::rtrim(f.urls[i], '/');
+ const url2 = strings::rtrim(acc.url, '/');
+ if (strings::compare(url1, url2) == 0) {
return true;
};
};