mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-11-04 07:24:13 +00:00 
			
		
		
		
	fix lints
This commit is contained in:
		
							parent
							
								
									d70024b4b9
								
							
						
					
					
						commit
						56563d8dc4
					
				
					 6 changed files with 8 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -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' ? {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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';
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -814,7 +814,7 @@ export class ActivityPubServerService {
 | 
			
		|||
		});
 | 
			
		||||
 | 
			
		||||
		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');
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -8,6 +8,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
 | 
			
		|||
import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
 | 
			
		||||
import { DI } from '@/di-symbols.js';
 | 
			
		||||
import type { NotesRepository } from '@/models/_.js';
 | 
			
		||||
import { QueryService } from '@/core/QueryService.js';
 | 
			
		||||
import { ApiError } from '../../error.js';
 | 
			
		||||
 | 
			
		||||
export const meta = {
 | 
			
		||||
| 
						 | 
				
			
			@ -55,7 +56,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 | 
			
		|||
		super(meta, paramDef, async (ps, me) => {
 | 
			
		||||
			const query = await this.notesRepository.createQueryBuilder('note')
 | 
			
		||||
				.where('note.id = :noteId', { noteId: ps.noteId })
 | 
			
		||||
				.innerJoinAndSelect('user');
 | 
			
		||||
				.innerJoinAndSelect('note.user', 'user');
 | 
			
		||||
 | 
			
		||||
			this.queryService.generateVisibilityQuery(query, me);
 | 
			
		||||
			if (me) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue