Sort imports of streaming.ts
This commit is contained in:
parent
91a7ebc634
commit
af9fb6aaa3
|
@ -16,7 +16,7 @@ export class RelayError extends Error {
|
||||||
|
|
||||||
/** Throw a new RelayError if the OK message is false. */
|
/** Throw a new RelayError if the OK message is false. */
|
||||||
static assert(msg: NostrRelayOK): void {
|
static assert(msg: NostrRelayOK): void {
|
||||||
const [_, _eventId, ok, reason] = msg;
|
const [, , ok, reason] = msg;
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
throw RelayError.fromReason(reason);
|
throw RelayError.fromReason(reason);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,12 @@ import { z } from 'zod';
|
||||||
|
|
||||||
import { type AppController } from '@/app.ts';
|
import { type AppController } from '@/app.ts';
|
||||||
import { Conf } from '@/config.ts';
|
import { Conf } from '@/config.ts';
|
||||||
|
import { MuteListPolicy } from '@/policies/MuteListPolicy.ts';
|
||||||
import { getFeedPubkeys } from '@/queries.ts';
|
import { getFeedPubkeys } from '@/queries.ts';
|
||||||
import { bech32ToPubkey } from '@/utils.ts';
|
|
||||||
import { renderReblog, renderStatus } from '@/views/mastodon/statuses.ts';
|
|
||||||
import { hydrateEvents } from '@/storages/hydrate.ts';
|
import { hydrateEvents } from '@/storages/hydrate.ts';
|
||||||
import { Storages } from '@/storages.ts';
|
import { Storages } from '@/storages.ts';
|
||||||
import { MuteListPolicy } from '@/policies/MuteListPolicy.ts';
|
import { bech32ToPubkey } from '@/utils.ts';
|
||||||
|
import { renderReblog, renderStatus } from '@/views/mastodon/statuses.ts';
|
||||||
|
|
||||||
const debug = Debug('ditto:streaming');
|
const debug = Debug('ditto:streaming');
|
||||||
|
|
||||||
|
@ -78,8 +78,8 @@ const streamingController: AppController = (c) => {
|
||||||
|
|
||||||
if (pubkey) {
|
if (pubkey) {
|
||||||
const policy = new MuteListPolicy(pubkey, await Storages.admin());
|
const policy = new MuteListPolicy(pubkey, await Storages.admin());
|
||||||
const ok = await policy.call(event);
|
const [, , ok] = await policy.call(event);
|
||||||
if (ok[2] === false) {
|
if (!ok) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue