fix: accept 15 featured posts (close #61)
This commit is contained in:
parent
3c3907a368
commit
8d41b85780
3 changed files with 4 additions and 2 deletions
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
## 細かい変更点
|
## 細かい変更点
|
||||||
|
|
||||||
|
- 最大 15 件の投稿を固定できるように
|
||||||
|
- 5 件は少ないと思ったため
|
||||||
- 投稿ボタンを巨大にできるように
|
- 投稿ボタンを巨大にできるように
|
||||||
- https://mstdn.poyo.me/@prime/110668364208741253 を真似しました
|
- https://mstdn.poyo.me/@prime/110668364208741253 を真似しました
|
||||||
- アンテナにフォロー中のユーザーのホーム投稿も表示する
|
- アンテナにフォロー中のユーザーのホーム投稿も表示する
|
||||||
|
|
|
@ -671,7 +671,7 @@ export async function updateFeatured(userId: User["id"], resolver?: Resolver) {
|
||||||
const featuredNotes = await Promise.all(
|
const featuredNotes = await Promise.all(
|
||||||
items
|
items
|
||||||
.filter((item) => getApType(item) === "Note") // TODO: Maybe it doesn't have to be a Note.
|
.filter((item) => getApType(item) === "Note") // TODO: Maybe it doesn't have to be a Note.
|
||||||
.slice(0, 5)
|
.slice(0, 15)
|
||||||
.map((item) => limit(() => resolveNote(item, resolver))),
|
.map((item) => limit(() => resolveNote(item, resolver))),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ export async function addPinned(
|
||||||
|
|
||||||
const pinings = await UserNotePinings.findBy({ userId: user.id });
|
const pinings = await UserNotePinings.findBy({ userId: user.id });
|
||||||
|
|
||||||
if (pinings.length >= 5) {
|
if (pinings.length >= 15) {
|
||||||
throw new IdentifiableError(
|
throw new IdentifiableError(
|
||||||
"15a018eb-58e5-4da1-93be-330fcc5e4e1a",
|
"15a018eb-58e5-4da1-93be-330fcc5e4e1a",
|
||||||
"You can not pin notes any more.",
|
"You can not pin notes any more.",
|
||||||
|
|
Loading…
Reference in a new issue