fix lints

This commit is contained in:
dakkar 2024-11-22 13:09:58 +00:00
parent d70024b4b9
commit 56563d8dc4
6 changed files with 8 additions and 5 deletions

View file

@ -14,7 +14,7 @@ import type { OnApplicationShutdown } from '@nestjs/common';
import type { Packed } from '@/misc/json-schema.js';
export type UserWebhookPayload<T extends WebhookEventTypes> =
T extends 'note' | 'reply' | 'renote' |'mention' ? {
T extends 'note' | 'reply' | 'renote' |'mention' | 'edited' ? {
note: Packed<'Note'>,
} :
T extends 'follow' | 'unfollow' ? {

View file

@ -389,6 +389,10 @@ export class WebhookTestService {
send('mention', { note: toPackedNote(dummyMention1) });
break;
}
case 'edited': {
send('edited', { note: toPackedNote(dummyNote1) });
break;
}
case 'follow': {
send('follow', { user: toPackedUserDetailedNotMe(dummyUser1) });
break;

View file

@ -16,7 +16,6 @@ import { HttpRequestService } from '@/core/HttpRequestService.js';
import { LoggerService } from '@/core/LoggerService.js';
import { bindThis } from '@/decorators.js';
import type Logger from '@/logger.js';
import type { IObject } from './type.js';
import { validateContentTypeSetAsActivityPub } from '@/core/activitypub/misc/validator.js';
import { assertActivityMatchesUrls } from '@/core/activitypub/misc/check-against-url.js';
import type { IObject } from './type.js';

View file

@ -421,7 +421,6 @@ export class ApNoteService {
const url = getOneApHrefNullable(note.url);
if (url != null) {
if (!checkHttps(url)) {
throw new Error('unexpected schema of note url: ' + url);