filter: treat the admin pubkey as local

This commit is contained in:
Alex Gleason 2023-08-26 17:31:52 -05:00
parent 9cd1ca1861
commit 1806cf2286
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 2 additions and 1 deletions

View File

@ -1,3 +1,4 @@
import { Conf } from '@/config.ts';
import { type Event, type Filter, matchFilters } from '@/deps.ts';
import type { EventData } from '@/types.ts';
@ -16,7 +17,7 @@ interface GetFiltersOpts {
}
function matchDittoFilter(filter: DittoFilter, event: Event, data: EventData): boolean {
if (filter.local && !data.user) {
if (filter.local && !(data.user || event.pubkey === Conf.pubkey)) {
return false;
}