1
0
Fork 1
mirror of https://example.com synced 2024-11-22 12:16:40 +09:00

fix: accept 15 featured posts (close #61)

This commit is contained in:
naskya 2023-08-08 17:22:08 +09:00
parent 3c3907a368
commit 8d41b85780
Signed by: naskya
GPG key ID: 164DFF24E2D40139
3 changed files with 4 additions and 2 deletions

View file

@ -24,6 +24,8 @@
## 細かい変更点
- 最大 15 件の投稿を固定できるように
- 5 件は少ないと思ったため
- 投稿ボタンを巨大にできるように
- https://mstdn.poyo.me/@prime/110668364208741253 を真似しました
- アンテナにフォロー中のユーザーのホーム投稿も表示する

View file

@ -671,7 +671,7 @@ export async function updateFeatured(userId: User["id"], resolver?: Resolver) {
const featuredNotes = await Promise.all(
items
.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))),
);

View file

@ -35,7 +35,7 @@ export async function addPinned(
const pinings = await UserNotePinings.findBy({ userId: user.id });
if (pinings.length >= 5) {
if (pinings.length >= 15) {
throw new IdentifiableError(
"15a018eb-58e5-4da1-93be-330fcc5e4e1a",
"You can not pin notes any more.",