mirror of
https://github.com/paricafe/misskey.git
synced 2025-01-17 21:30:49 -06:00
Respect pinned note limit for remote users
This commit is contained in:
parent
6fa4c253fd
commit
b5cc31b65c
1 changed files with 2 additions and 1 deletions
|
@ -730,9 +730,10 @@ export class ApPersonService implements OnModuleInit {
|
|||
|
||||
// Resolve and regist Notes
|
||||
const limit = promiseLimit<MiNote | null>(2);
|
||||
const maxPinned = (await this.roleService.getUserPolicies(user.id)).pinLimit;
|
||||
const featuredNotes = await Promise.all(items
|
||||
.filter(item => getApType(item) === 'Note') // TODO: Noteでなくてもいいかも
|
||||
.slice(0, 5)
|
||||
.slice(0, maxPinned)
|
||||
.map(item => limit(() => this.apNoteService.resolveNote(item, {
|
||||
resolver: _resolver,
|
||||
sentFrom: new URL(user.uri),
|
||||
|
|
Loading…
Reference in a new issue