fix: negentropy version check
This commit is contained in:
@ -18,5 +18,5 @@ export interface RelayInfo {
|
||||
language_tags?: Array<string>;
|
||||
tags?: Array<string>;
|
||||
posting_policy?: string;
|
||||
negentropy?: string;
|
||||
negentropy?: number;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ export class DefaultSyncModule implements ConnectionSyncModule {
|
||||
|
||||
sync(c: Connection, item: SyncCommand, cb?: () => void) {
|
||||
const [_, id, eventSet, ...filters] = item;
|
||||
if (c.info?.negentropy === "v1") {
|
||||
if ((c.info?.negentropy ?? NaN) >= 1) {
|
||||
const newFilters = filters;
|
||||
const neg = new NegentropyFlow(id, c, eventSet, newFilters);
|
||||
neg.once("finish", filters => {
|
||||
|
Reference in New Issue
Block a user