Rename DittoAPIStore to DittoRelayStore

This commit is contained in:
Alex Gleason 2025-02-23 18:02:45 -06:00
parent 77c0ac3561
commit ec498653fb
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
2 changed files with 5 additions and 5 deletions

View file

@ -4,7 +4,7 @@ import { genEvent, MockRelay } from '@nostrify/nostrify/test';
import { assertEquals } from '@std/assert';
import { generateSecretKey, getPublicKey } from 'nostr-tools';
import { DittoAPIStore } from './DittoAPIStore.ts';
import { DittoRelayStore } from './DittoRelayStore.ts';
import type { NostrMetadata } from '@nostrify/types';
@ -50,7 +50,7 @@ function setupTest(cb: (req: Request) => Response | Promise<Response>) {
return await cb(req);
};
const store = new DittoAPIStore({ conf, db, relay, pool, fetch: mockFetch });
const store = new DittoRelayStore({ conf, db, relay, pool, fetch: mockFetch });
return {
db,

View file

@ -43,7 +43,7 @@ import { unfurlCardCached } from '@/utils/unfurl.ts';
import { renderWebPushNotification } from '@/views/mastodon/push.ts';
import { nip19 } from 'nostr-tools';
interface DittoAPIStoreOpts {
interface DittoRelayStoreOpts {
db: DittoDB;
conf: DittoConf;
pool: NRelay;
@ -51,7 +51,7 @@ interface DittoAPIStoreOpts {
fetch?: typeof fetch;
}
export class DittoAPIStore implements NRelay {
export class DittoRelayStore implements NRelay {
private push: DittoPush;
private encounters = new LRUCache<string, true>({ max: 5000 });
private controller = new AbortController();
@ -62,7 +62,7 @@ export class DittoAPIStore implements NRelay {
private ns = 'ditto.apistore';
constructor(private opts: DittoAPIStoreOpts) {
constructor(private opts: DittoRelayStoreOpts) {
const { conf, db } = this.opts;
this.push = new DittoPush(opts);