fix for pinned users. update changelog (#9159)
This commit is contained in:
parent
24d18a7b19
commit
2492f4e81e
@ -19,6 +19,7 @@ You should also include the user name that made the change.
|
|||||||
### Improvements
|
### Improvements
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
- Server: Bug fix for Pinned Users lookup on instance @squidicuzz
|
||||||
|
|
||||||
## 12.119.0 (2022/09/10)
|
## 12.119.0 (2022/09/10)
|
||||||
|
|
||||||
|
@ -43,12 +43,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const meta = await this.metaService.fetch();
|
const meta = await this.metaService.fetch();
|
||||||
|
|
||||||
const users = await Promise.all(meta.pinnedthis.usersRepository.map(acct => Acct.parse(acct)).map(acct => this.usersRepository.findOneBy({
|
const users = await Promise.all(meta.pinnedUsers.map(acct => Acct.parse(acct)).map(acct => this.usersRepository.findOneBy({
|
||||||
usernameLower: acct.username.toLowerCase(),
|
usernameLower: acct.username.toLowerCase(),
|
||||||
host: acct.host ?? IsNull(),
|
host: acct.host ?? IsNull(),
|
||||||
})));
|
})));
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users.filter(x => x !== undefined) as User[], me, { detail: true });
|
return await this.userEntityService.packMany(users.filter(x => x !== null) as User[], me, { detail: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user