chore: accept 15 featured posts

This commit is contained in:
naskya 2024-02-16 03:59:48 +09:00
parent 47a170cf47
commit b665a5bccf
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C
3 changed files with 3 additions and 2 deletions

View file

@ -3,6 +3,7 @@
- add ability to specify the search engine used in the search bar MFM
- remove auto NSFW media detection
- the "Hide NSFW media" config is now per device and per account
- increase the max number of pinned posts from 5 to 15
# v20240216

View file

@ -692,7 +692,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 cannot pin notes any more.",