mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-20 01:40:29 +00:00
remove prefix matching for ids and authors filter fields
- this also fixes https://github.com/hoytech/strfry/issues/109
This commit is contained in:
@ -46,7 +46,7 @@ sub doesMatchSingle {
|
||||
if ($filter->{ids}) {
|
||||
my $found;
|
||||
foreach my $id (@{ $filter->{ids} }) {
|
||||
if (startsWith($ev->{id}, $id)) {
|
||||
if ($ev->{id} eq $id) {
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
@ -57,7 +57,7 @@ sub doesMatchSingle {
|
||||
if ($filter->{authors}) {
|
||||
my $found;
|
||||
foreach my $author (@{ $filter->{authors} }) {
|
||||
if (startsWith($ev->{pubkey}, $author)) {
|
||||
if ($ev->{pubkey} eq $author) {
|
||||
$found = 1;
|
||||
last;
|
||||
}
|
||||
@ -117,7 +117,3 @@ sub doesMatchSingle {
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub startsWith {
|
||||
return rindex($_[0], $_[1], 0) == 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user