fix lints
This commit is contained in:
parent
d70024b4b9
commit
56563d8dc4
|
@ -14,7 +14,7 @@ import type { OnApplicationShutdown } from '@nestjs/common';
|
||||||
import type { Packed } from '@/misc/json-schema.js';
|
import type { Packed } from '@/misc/json-schema.js';
|
||||||
|
|
||||||
export type UserWebhookPayload<T extends WebhookEventTypes> =
|
export type UserWebhookPayload<T extends WebhookEventTypes> =
|
||||||
T extends 'note' | 'reply' | 'renote' |'mention' ? {
|
T extends 'note' | 'reply' | 'renote' |'mention' | 'edited' ? {
|
||||||
note: Packed<'Note'>,
|
note: Packed<'Note'>,
|
||||||
} :
|
} :
|
||||||
T extends 'follow' | 'unfollow' ? {
|
T extends 'follow' | 'unfollow' ? {
|
||||||
|
|
|
@ -389,6 +389,10 @@ export class WebhookTestService {
|
||||||
send('mention', { note: toPackedNote(dummyMention1) });
|
send('mention', { note: toPackedNote(dummyMention1) });
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case 'edited': {
|
||||||
|
send('edited', { note: toPackedNote(dummyNote1) });
|
||||||
|
break;
|
||||||
|
}
|
||||||
case 'follow': {
|
case 'follow': {
|
||||||
send('follow', { user: toPackedUserDetailedNotMe(dummyUser1) });
|
send('follow', { user: toPackedUserDetailedNotMe(dummyUser1) });
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -16,7 +16,6 @@ import { HttpRequestService } from '@/core/HttpRequestService.js';
|
||||||
import { LoggerService } from '@/core/LoggerService.js';
|
import { LoggerService } from '@/core/LoggerService.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import type Logger from '@/logger.js';
|
import type Logger from '@/logger.js';
|
||||||
import type { IObject } from './type.js';
|
|
||||||
import { validateContentTypeSetAsActivityPub } from '@/core/activitypub/misc/validator.js';
|
import { validateContentTypeSetAsActivityPub } from '@/core/activitypub/misc/validator.js';
|
||||||
import { assertActivityMatchesUrls } from '@/core/activitypub/misc/check-against-url.js';
|
import { assertActivityMatchesUrls } from '@/core/activitypub/misc/check-against-url.js';
|
||||||
import type { IObject } from './type.js';
|
import type { IObject } from './type.js';
|
||||||
|
|
|
@ -421,7 +421,6 @@ export class ApNoteService {
|
||||||
|
|
||||||
const url = getOneApHrefNullable(note.url);
|
const url = getOneApHrefNullable(note.url);
|
||||||
|
|
||||||
|
|
||||||
if (url != null) {
|
if (url != null) {
|
||||||
if (!checkHttps(url)) {
|
if (!checkHttps(url)) {
|
||||||
throw new Error('unexpected schema of note url: ' + url);
|
throw new Error('unexpected schema of note url: ' + url);
|
||||||
|
|
|
@ -814,7 +814,7 @@ export class ActivityPubServerService {
|
||||||
});
|
});
|
||||||
|
|
||||||
fastify.get<{ Params: { acct: string; } }>('/@:acct', { constraints: { apOrHtml: 'ap' } }, async (request, reply) => {
|
fastify.get<{ Params: { acct: string; } }>('/@:acct', { constraints: { apOrHtml: 'ap' } }, async (request, reply) => {
|
||||||
if (await this.shouldRefuseGetRequest(request, reply, request.params.user)) return;
|
if (await this.shouldRefuseGetRequest(request, reply, request.params.acct)) return;
|
||||||
|
|
||||||
vary(reply.raw, 'Accept');
|
vary(reply.raw, 'Accept');
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
|
||||||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import type { NotesRepository } from '@/models/_.js';
|
import type { NotesRepository } from '@/models/_.js';
|
||||||
|
import { QueryService } from '@/core/QueryService.js';
|
||||||
import { ApiError } from '../../error.js';
|
import { ApiError } from '../../error.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
|
@ -55,7 +56,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const query = await this.notesRepository.createQueryBuilder('note')
|
const query = await this.notesRepository.createQueryBuilder('note')
|
||||||
.where('note.id = :noteId', { noteId: ps.noteId })
|
.where('note.id = :noteId', { noteId: ps.noteId })
|
||||||
.innerJoinAndSelect('user');
|
.innerJoinAndSelect('note.user', 'user');
|
||||||
|
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
if (me) {
|
if (me) {
|
||||||
|
|
Loading…
Reference in New Issue