Sort imports of streaming.ts

This commit is contained in:
Alex Gleason 2024-05-14 20:05:38 -05:00
parent 91a7ebc634
commit af9fb6aaa3
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 6 additions and 6 deletions

View File

@ -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);
} }

View File

@ -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;
} }
} }