fix: 複数idを指定するusers/show
が関係ないユーザを返すことがある問題を修正 (#13765)
* fix: 複数idを指定する`users/show`が関係ないユーザを返すことがある問題を修正 * test: fix misskey js test * chore: user/showがnullを返さないように * chore: pass lambda instead of pushVisibleUser
This commit is contained in:
parent
ed74f7b4a8
commit
5836bd85df
4 changed files with 8 additions and 9 deletions
|
@ -110,9 +110,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
});
|
||||
|
||||
// リクエストされた通りに並べ替え
|
||||
// 順番は保持されるけど数は減ってる可能性がある
|
||||
const _users: MiUser[] = [];
|
||||
for (const id of ps.userIds) {
|
||||
_users.push(users.find(x => x.id === id)!);
|
||||
const user = users.find(x => x.id === id);
|
||||
if (user != null) _users.push(user);
|
||||
}
|
||||
|
||||
return await Promise.all(_users.map(u => this.userEntityService.pack(u, me, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue