Role timeline setting (#10677)
* ロールタイムライン設定 * isRoleTimeline to isExplorable * ポリシーではないので削除 * 型からも * wip * 足りてなかった説 * wip * listはpublicを表示 * 前回の記載修正( #10671 ) --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
@@ -65,12 +65,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||
super(meta, paramDef, async (ps, me) => {
|
||||
const role = await this.rolesRepository.findOneBy({
|
||||
id: ps.roleId,
|
||||
isPublic: true,
|
||||
});
|
||||
|
||||
if (role == null) {
|
||||
throw new ApiError(meta.errors.noSuchRole);
|
||||
}
|
||||
|
||||
if (!role.isExplorable) {
|
||||
return [];
|
||||
}
|
||||
const limit = ps.limit + (ps.untilId ? 1 : 0) + (ps.sinceId ? 1 : 0); // untilIdに指定したものも含まれるため+1
|
||||
const noteIdsRes = await this.redisClient.xrevrange(
|
||||
`roleTimeline:${role.id}`,
|
||||
|
Reference in New Issue
Block a user