mirror of
https://github.com/MisskeyIO/misskey
synced 2024-11-23 14:46:40 +09:00
Merge remote-tracking branch 'misskey-dev/develop' into io
This commit is contained in:
commit
acfe1cb82d
@ -4,12 +4,10 @@
|
||||
"service": "app",
|
||||
"workspaceFolder": "/workspace",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers-contrib/features/pnpm:2": {
|
||||
"version": "latest"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/node:1": {
|
||||
"version": "20"
|
||||
}
|
||||
},
|
||||
"ghcr.io/devcontainers-contrib/features/corepack:1": {}
|
||||
},
|
||||
"forwardPorts": [3000],
|
||||
"postCreateCommand": "sudo chmod 755 .devcontainer/init.sh && .devcontainer/init.sh",
|
||||
|
@ -4,6 +4,8 @@ set -xe
|
||||
|
||||
sudo chown -R node /workspace
|
||||
git submodule update --init
|
||||
corepack install
|
||||
corepack enable
|
||||
pnpm config set store-dir /home/node/.local/share/pnpm/store
|
||||
pnpm install --frozen-lockfile
|
||||
cp .devcontainer/devcontainer.yml .config/default.yml
|
||||
|
1
.github/FUNDING.yml
vendored
1
.github/FUNDING.yml
vendored
@ -1,3 +1,4 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [misskey-dev]
|
||||
patreon: syuilo
|
||||
|
@ -250,20 +250,41 @@ export class UserEntityService implements OnModuleInit {
|
||||
] = await Promise.all([
|
||||
this.followingsRepository.findBy({ followerId: me })
|
||||
.then(f => new Map(f.map(it => [it.followeeId, it]))),
|
||||
this.followingsRepository.findBy({ followeeId: me })
|
||||
.then(it => it.map(it => it.followerId)),
|
||||
this.followRequestsRepository.findBy({ followerId: me })
|
||||
.then(it => it.map(it => it.followeeId)),
|
||||
this.followRequestsRepository.findBy({ followeeId: me })
|
||||
.then(it => it.map(it => it.followerId)),
|
||||
this.blockingsRepository.findBy({ blockerId: me })
|
||||
.then(it => it.map(it => it.blockeeId)),
|
||||
this.blockingsRepository.findBy({ blockeeId: me })
|
||||
.then(it => it.map(it => it.blockerId)),
|
||||
this.mutingsRepository.findBy({ muterId: me })
|
||||
.then(it => it.map(it => it.muteeId)),
|
||||
this.renoteMutingsRepository.findBy({ muterId: me })
|
||||
.then(it => it.map(it => it.muteeId)),
|
||||
this.followingsRepository.createQueryBuilder('f')
|
||||
.select('f.followerId')
|
||||
.where('f.followeeId = :me', { me })
|
||||
.getRawMany<{ f_followerId: string }>()
|
||||
.then(it => it.map(it => it.f_followerId)),
|
||||
this.followRequestsRepository.createQueryBuilder('f')
|
||||
.select('f.followeeId')
|
||||
.where('f.followerId = :me', { me })
|
||||
.getRawMany<{ f_followeeId: string }>()
|
||||
.then(it => it.map(it => it.f_followeeId)),
|
||||
this.followRequestsRepository.createQueryBuilder('f')
|
||||
.select('f.followerId')
|
||||
.where('f.followeeId = :me', { me })
|
||||
.getRawMany<{ f_followerId: string }>()
|
||||
.then(it => it.map(it => it.f_followerId)),
|
||||
this.blockingsRepository.createQueryBuilder('b')
|
||||
.select('b.blockeeId')
|
||||
.where('b.blockerId = :me', { me })
|
||||
.getRawMany<{ b_blockeeId: string }>()
|
||||
.then(it => it.map(it => it.b_blockeeId)),
|
||||
this.blockingsRepository.createQueryBuilder('b')
|
||||
.select('b.blockerId')
|
||||
.where('b.blockeeId = :me', { me })
|
||||
.getRawMany<{ b_blockerId: string }>()
|
||||
.then(it => it.map(it => it.b_blockerId)),
|
||||
this.mutingsRepository.createQueryBuilder('m')
|
||||
.select('m.muteeId')
|
||||
.where('m.muterId = :me', { me })
|
||||
.getRawMany<{ m_muteeId: string }>()
|
||||
.then(it => it.map(it => it.m_muteeId)),
|
||||
this.renoteMutingsRepository.createQueryBuilder('m')
|
||||
.select('m.muteeId')
|
||||
.where('m.muterId = :me', { me })
|
||||
.getRawMany<{ m_muteeId: string }>()
|
||||
.then(it => it.map(it => it.m_muteeId)),
|
||||
]);
|
||||
|
||||
return new Map(
|
||||
@ -641,18 +662,17 @@ export class UserEntityService implements OnModuleInit {
|
||||
}
|
||||
const _userIds = _users.map(u => u.id);
|
||||
|
||||
// -- 特に前提条件のない値群を取得
|
||||
|
||||
const profilesMap = (options?.schema !== 'UserLite') ? await this.userProfilesRepository.findBy({ userId: In(_userIds) })
|
||||
.then(profiles => new Map(profiles.map(p => [p.userId, p]))) : undefined;
|
||||
|
||||
// -- 実行者の有無や指定スキーマの種別によって要否が異なる値群を取得
|
||||
|
||||
let profilesMap: Map<MiUser['id'], MiUserProfile> = new Map();
|
||||
let userRelations: Map<MiUser['id'], UserRelation> = new Map();
|
||||
let userMemos: Map<MiUser['id'], string | null> = new Map();
|
||||
let pinNotes: Map<MiUser['id'], MiUserNotePining[]> = new Map();
|
||||
|
||||
if (options?.schema !== 'UserLite') {
|
||||
profilesMap = await this.userProfilesRepository.findBy({ userId: In(_userIds) })
|
||||
.then(profiles => new Map(profiles.map(p => [p.userId, p])));
|
||||
|
||||
const meId = me ? me.id : null;
|
||||
if (meId) {
|
||||
userMemos = await this.userMemosRepository.findBy({ userId: meId })
|
||||
|
Loading…
Reference in New Issue
Block a user