Merge branch 'develop' into pag-back

This commit is contained in:
tamaina 2023-07-25 10:36:55 +00:00
commit cf764eebe3
11 changed files with 15 additions and 15 deletions

View file

@ -8,7 +8,7 @@
- -
### Server ### Server
- - Fix: 外部サーバーの投稿がタイムラインに表示されないことがある問題を修正
--> -->
## 13.x.x (unreleased) ## 13.x.x (unreleased)
@ -20,7 +20,7 @@
- リストTLで、ユーザーが追加・削除されてもTLを初期化しないように - リストTLで、ユーザーが追加・削除されてもTLを初期化しないように
### Server ### Server
- - Fix: APIのオフセットが壊れていたせいで「もっと見る」でもっと見れない問題を修正
## 13.14.1 ## 13.14.1

View file

@ -95,7 +95,7 @@ export class ApAudienceService {
private isPublic(id: string): boolean { private isPublic(id: string): boolean {
return [ return [
'https://www.w3.org/ns/activitystreams#Public', 'https://www.w3.org/ns/activitystreams#Public',
'as#Public', 'as:Public',
'Public', 'Public',
].includes(id); ].includes(id);
} }

View file

@ -60,7 +60,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
} }
query.limit(ps.limit); query.limit(ps.limit);
query.skip(ps.offset); query.offset(ps.offset);
const tickets = await query.getMany(); const tickets = await query.getMany();

View file

@ -105,7 +105,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
} }
query.limit(ps.limit); query.limit(ps.limit);
query.skip(ps.offset); query.offset(ps.offset);
const users = await query.getMany(); const users = await query.getMany();

View file

@ -126,7 +126,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
query.andWhere('instance.host like :host', { host: '%' + sqlLikeEscape(ps.host.toLowerCase()) + '%' }); query.andWhere('instance.host like :host', { host: '%' + sqlLikeEscape(ps.host.toLowerCase()) + '%' });
} }
const instances = await query.limit(ps.limit).skip(ps.offset).getMany(); const instances = await query.limit(ps.limit).offset(ps.offset).getMany();
return await this.instanceEntityService.packMany(instances); return await this.instanceEntityService.packMany(instances);
}); });

View file

@ -42,7 +42,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
.orderBy('tag.count', 'DESC') .orderBy('tag.count', 'DESC')
.groupBy('tag.id') .groupBy('tag.id')
.limit(ps.limit) .limit(ps.limit)
.skip(ps.offset) .offset(ps.offset)
.getMany(); .getMany();
return hashtags.map(tag => tag.name); return hashtags.map(tag => tag.name);

View file

@ -83,7 +83,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
const polls = await query const polls = await query
.orderBy('poll.noteId', 'DESC') .orderBy('poll.noteId', 'DESC')
.limit(ps.limit) .limit(ps.limit)
.skip(ps.offset) .offset(ps.offset)
.getMany(); .getMany();
if (polls.length === 0) return []; if (polls.length === 0) return [];

View file

@ -81,7 +81,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
if (me) this.queryService.generateBlockQueryForUsers(query, me); if (me) this.queryService.generateBlockQueryForUsers(query, me);
query.limit(ps.limit); query.limit(ps.limit);
query.skip(ps.offset); query.offset(ps.offset);
const users = await query.getMany(); const users = await query.getMany();

View file

@ -70,7 +70,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
query.setParameters(followingQuery.getParameters()); query.setParameters(followingQuery.getParameters());
const users = await query.limit(ps.limit).skip(ps.offset).getMany(); const users = await query.limit(ps.limit).offset(ps.offset).getMany();
return await this.userEntityService.packMany(users, me, { detail: true }); return await this.userEntityService.packMany(users, me, { detail: true });
}); });

View file

@ -75,7 +75,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
users = await usernameQuery users = await usernameQuery
.orderBy('user.updatedAt', 'DESC', 'NULLS LAST') .orderBy('user.updatedAt', 'DESC', 'NULLS LAST')
.limit(ps.limit) .limit(ps.limit)
.skip(ps.offset) .offset(ps.offset)
.getMany(); .getMany();
} else { } else {
const nameQuery = this.usersRepository.createQueryBuilder('user') const nameQuery = this.usersRepository.createQueryBuilder('user')
@ -102,7 +102,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
users = await nameQuery users = await nameQuery
.orderBy('user.updatedAt', 'DESC', 'NULLS LAST') .orderBy('user.updatedAt', 'DESC', 'NULLS LAST')
.limit(ps.limit) .limit(ps.limit)
.skip(ps.offset) .offset(ps.offset)
.getMany(); .getMany();
if (users.length < ps.limit) { if (users.length < ps.limit) {
@ -128,7 +128,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
users = users.concat(await query users = users.concat(await query
.orderBy('user.updatedAt', 'DESC', 'NULLS LAST') .orderBy('user.updatedAt', 'DESC', 'NULLS LAST')
.limit(ps.limit) .limit(ps.limit)
.skip(ps.offset) .offset(ps.offset)
.getMany(), .getMany(),
); );
} }

View file

@ -3,7 +3,7 @@ import { dirname } from 'node:path';
import { fileURLToPath } from 'node:url'; import { fileURLToPath } from 'node:url';
import { Inject, Injectable } from '@nestjs/common'; import { Inject, Injectable } from '@nestjs/common';
import { createBullBoard } from '@bull-board/api'; import { createBullBoard } from '@bull-board/api';
import { BullAdapter } from '@bull-board/api/bullAdapter.js'; import { BullMQAdapter } from '@bull-board/api/bullMQAdapter.js';
import { FastifyAdapter } from '@bull-board/fastify'; import { FastifyAdapter } from '@bull-board/fastify';
import ms from 'ms'; import ms from 'ms';
import sharp from 'sharp'; import sharp from 'sharp';
@ -168,7 +168,7 @@ export class ClientServerService {
this.dbQueue, this.dbQueue,
this.objectStorageQueue, this.objectStorageQueue,
this.webhookDeliverQueue, this.webhookDeliverQueue,
].map(q => new BullAdapter(q)), ].map(q => new BullMQAdapter(q)),
serverAdapter, serverAdapter,
}); });