forked from FoundKeyGang/FoundKey
server: fix some TS warnings
This commit is contained in:
parent
5444ca9aca
commit
7458550f7a
3 changed files with 7 additions and 7 deletions
|
@ -2,7 +2,6 @@ import { URL } from 'node:url';
|
|||
import Bull from 'bull';
|
||||
import { request } from '@/remote/activitypub/request.js';
|
||||
import { registerOrFetchInstanceDoc } from '@/services/register-or-fetch-instance-doc.js';
|
||||
import Logger from '@/services/logger.js';
|
||||
import { Instances } from '@/models/index.js';
|
||||
import { fetchInstanceMetadata } from '@/services/fetch-instance-metadata.js';
|
||||
import { toPuny } from '@/misc/convert-host.js';
|
||||
|
@ -11,8 +10,6 @@ import { getUserKeypair } from '@/misc/keypair-store.js';
|
|||
import { shouldSkipInstance } from '@/misc/skipped-instances.js';
|
||||
import { DeliverJobData } from '@/queue/types.js';
|
||||
|
||||
const logger = new Logger('deliver');
|
||||
|
||||
export default async (job: Bull.Job<DeliverJobData>) => {
|
||||
const { host } = new URL(job.data.to);
|
||||
const puny = toPuny(host);
|
||||
|
|
|
@ -193,13 +193,15 @@ export async function sideEffects(user: User, note: Note, silent = false, create
|
|||
}
|
||||
|
||||
// Word mute
|
||||
mutedWordsCache.fetch('').then(us => {
|
||||
for (const u of us) {
|
||||
checkWordMute(note, { id: u.userId }, u.mutedWords).then(shouldMute => {
|
||||
mutedWordsCache.fetch('').then(users => {
|
||||
if (users == null) return;
|
||||
|
||||
for (const user of users) {
|
||||
checkWordMute(note, { id: user.userId }, user.mutedWords).then(shouldMute => {
|
||||
if (shouldMute) {
|
||||
MutedNotes.insert({
|
||||
id: genId(),
|
||||
userId: u.userId,
|
||||
userId: user.userId,
|
||||
noteId: note.id,
|
||||
reason: 'word',
|
||||
});
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { IsNull } from 'typeorm';
|
||||
import { ILocalUser, User } from '@/models/entities/user.js';
|
||||
import { UserPublickey } from '@/models/entities/user-publickey.js';
|
||||
import { Users, UserPublickeys } from '@/models/index.js';
|
||||
import { Cache } from '@/misc/cache.js';
|
||||
import { subscriber } from '@/db/redis.js';
|
||||
|
|
Loading…
Reference in a new issue