mirror of
https://github.com/aljazceru/ditto.git
synced 2026-01-15 19:34:25 +01:00
Upgrade Nostrify
This commit is contained in:
@@ -15,7 +15,7 @@ export class Storages {
|
||||
private static _db: Promise<EventsDB> | undefined;
|
||||
private static _database: Promise<DittoDatabase> | undefined;
|
||||
private static _admin: Promise<AdminStore> | undefined;
|
||||
private static _client: Promise<NPool> | undefined;
|
||||
private static _client: Promise<NPool<NRelay1>> | undefined;
|
||||
private static _pubsub: Promise<InternalRelay> | undefined;
|
||||
private static _search: Promise<SearchStore> | undefined;
|
||||
|
||||
@@ -68,7 +68,7 @@ export class Storages {
|
||||
}
|
||||
|
||||
/** Relay pool storage. */
|
||||
public static async client(): Promise<NPool> {
|
||||
public static async client(): Promise<NPool<NRelay1>> {
|
||||
if (!this._client) {
|
||||
this._client = (async () => {
|
||||
const db = await this.db();
|
||||
|
||||
@@ -79,4 +79,8 @@ export class InternalRelay implements NRelay {
|
||||
async query(): Promise<NostrEvent[]> {
|
||||
return [];
|
||||
}
|
||||
|
||||
async close(): Promise<void> {
|
||||
return Promise.resolve();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'deno-safe-fetch/load';
|
||||
import { NostrEvent, NostrRelayOK, NPolicy } from '@nostrify/nostrify';
|
||||
import { NoOpPolicy, ReadOnlyPolicy } from '@nostrify/nostrify/policies';
|
||||
import { NoOpPolicy, ReadOnlyPolicy } from '@nostrify/policies';
|
||||
import * as Comlink from 'comlink';
|
||||
|
||||
import { DittoDB } from '@/db/DittoDB.ts';
|
||||
|
||||
Reference in New Issue
Block a user