Merge branch 'fix-db-export' into 'main'

fix filter generation in db:export

See merge request soapbox-pub/ditto!533
This commit is contained in:
Alex Gleason 2024-10-04 00:20:00 +00:00
commit d0666ff818

View file

@ -63,7 +63,7 @@ export function buildFilter(args: ExportFilter) {
if (invalid) throw new Error(`ERROR: Invalid pubkey ${invalid} supplied.`); if (invalid) throw new Error(`ERROR: Invalid pubkey ${invalid} supplied.`);
filter.authors = authors; filter.authors = authors;
} }
if (ids) { if (ids && ids.length) {
const invalid = findInvalid(ids); const invalid = findInvalid(ids);
if (invalid) throw new Error(`ERROR: Invalid event ID ${invalid} supplied.`); if (invalid) throw new Error(`ERROR: Invalid event ID ${invalid} supplied.`);
filter.ids = ids; filter.ids = ids;