filter: treat the admin pubkey as local
This commit is contained in:
parent
9cd1ca1861
commit
1806cf2286
|
@ -1,3 +1,4 @@
|
||||||
|
import { Conf } from '@/config.ts';
|
||||||
import { type Event, type Filter, matchFilters } from '@/deps.ts';
|
import { type Event, type Filter, matchFilters } from '@/deps.ts';
|
||||||
|
|
||||||
import type { EventData } from '@/types.ts';
|
import type { EventData } from '@/types.ts';
|
||||||
|
@ -16,7 +17,7 @@ interface GetFiltersOpts {
|
||||||
}
|
}
|
||||||
|
|
||||||
function matchDittoFilter(filter: DittoFilter, event: Event, data: EventData): boolean {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue