mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Rename DittoAPIStore to DittoRelayStore
This commit is contained in:
parent
77c0ac3561
commit
ec498653fb
2 changed files with 5 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
@ -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);
|
||||
Loading…
Add table
Reference in a new issue