Merge tag '13.11.0' into io
# Conflicts: # packages/backend/src/server/ServerService.ts # packages/backend/src/server/api/endpoints/notes/timeline.ts
This commit is contained in:
		| @@ -6,7 +6,7 @@ import { QueryService } from '@/core/QueryService.js'; | ||||
| import ActiveUsersChart from '@/core/chart/charts/active-users.js'; | ||||
| import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; | ||||
| import { DI } from '@/di-symbols.js'; | ||||
| import { getTimeId } from '@/misc/id/aid.js'; | ||||
| import { IdService } from '@/core/IdService.js'; | ||||
|  | ||||
| export const meta = { | ||||
| 	tags: ['notes'], | ||||
| @@ -57,6 +57,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 		private noteEntityService: NoteEntityService, | ||||
| 		private queryService: QueryService, | ||||
| 		private activeUsersChart: ActiveUsersChart, | ||||
| 		private idService: IdService, | ||||
| 	) { | ||||
| 		super(meta, paramDef, async (ps, me) => { | ||||
| 			const followees = await this.followingsRepository.createQueryBuilder('following') | ||||
| @@ -68,18 +69,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 			//#region Construct query | ||||
| 			const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), | ||||
| 				ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) | ||||
| 				.andWhere('note.id > :minId', { minId }) | ||||
| 				.andWhere('note.id > :minId', { minId: this.idService.genId(new Date(Date.now() - (1000 * 60 * 60 * 24 * 10))) }) // 10日前まで | ||||
| 				.innerJoinAndSelect('note.user', 'user') | ||||
| 				.leftJoinAndSelect('user.avatar', 'avatar') | ||||
| 				.leftJoinAndSelect('user.banner', 'banner') | ||||
| 				.leftJoinAndSelect('note.reply', 'reply') | ||||
| 				.leftJoinAndSelect('note.renote', 'renote') | ||||
| 				.leftJoinAndSelect('reply.user', 'replyUser') | ||||
| 				.leftJoinAndSelect('replyUser.avatar', 'replyUserAvatar') | ||||
| 				.leftJoinAndSelect('replyUser.banner', 'replyUserBanner') | ||||
| 				.leftJoinAndSelect('renote.user', 'renoteUser') | ||||
| 				.leftJoinAndSelect('renoteUser.avatar', 'renoteUserAvatar') | ||||
| 				.leftJoinAndSelect('renoteUser.banner', 'renoteUserBanner'); | ||||
| 				.leftJoinAndSelect('renote.user', 'renoteUser'); | ||||
|  | ||||
| 			if (followees.length > 0) { | ||||
| 				const meOrFolloweeIds = [me.id, ...followees.map(f => f.followeeId)]; | ||||
| @@ -95,6 +90,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { | ||||
| 			this.queryService.generateMutedUserQuery(query, me); | ||||
| 			this.queryService.generateMutedNoteQuery(query, me); | ||||
| 			this.queryService.generateBlockedUserQuery(query, me); | ||||
| 			this.queryService.generateMutedUserRenotesQueryForNotes(query, me); | ||||
|  | ||||
| 			if (ps.includeMyRenotes === false) { | ||||
| 				query.andWhere(new Brackets(qb => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 和風ドレッシング
					和風ドレッシング