Refactor
This commit is contained in:
@@ -54,18 +54,6 @@ export class UserRepository extends Repository<User> {
|
||||
};
|
||||
}
|
||||
|
||||
public packMany(
|
||||
users: (User['id'] | User)[],
|
||||
me?: User['id'] | User | null | undefined,
|
||||
options?: {
|
||||
detail?: boolean,
|
||||
includeSecrets?: boolean,
|
||||
includeHasUnreadNotes?: boolean
|
||||
}
|
||||
) {
|
||||
return Promise.all(users.map(u => this.pack(u, me, options)));
|
||||
}
|
||||
|
||||
public async pack(
|
||||
src: User['id'] | User,
|
||||
me?: User['id'] | User | null | undefined,
|
||||
@@ -187,6 +175,18 @@ export class UserRepository extends Repository<User> {
|
||||
return await awaitAll(packed);
|
||||
}
|
||||
|
||||
public packMany(
|
||||
users: (User['id'] | User)[],
|
||||
me?: User['id'] | User | null | undefined,
|
||||
options?: {
|
||||
detail?: boolean,
|
||||
includeSecrets?: boolean,
|
||||
includeHasUnreadNotes?: boolean
|
||||
}
|
||||
) {
|
||||
return Promise.all(users.map(u => this.pack(u, me, options)));
|
||||
}
|
||||
|
||||
public isLocalUser(user: User): user is ILocalUser {
|
||||
return user.host == null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user