summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/renderer/person.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2021-02-13 15:33:38 +0900
committersyuilo <syuilotan@yahoo.co.jp>2021-02-13 15:33:38 +0900
commit91172654e4b715198099146d4c442e0787df0785 (patch)
treed6cc5de1c3be9e143c76c05fffe7d2f07fc376c8 /src/remote/activitypub/renderer/person.ts
parentwip: email notification (diff)
downloadmisskey-91172654e4b715198099146d4c442e0787df0785.tar.gz
misskey-91172654e4b715198099146d4c442e0787df0785.tar.bz2
misskey-91172654e4b715198099146d4c442e0787df0785.zip
refactor: resolve #7139
Diffstat (limited to 'src/remote/activitypub/renderer/person.ts')
-rw-r--r--src/remote/activitypub/renderer/person.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts
index 4462f88315..4907e3bc6f 100644
--- a/src/remote/activitypub/renderer/person.ts
+++ b/src/remote/activitypub/renderer/person.ts
@@ -9,7 +9,6 @@ import renderEmoji from './emoji';
import { IIdentifier } from '../models/identifier';
import renderHashtag from './hashtag';
import { DriveFiles, UserProfiles, UserKeypairs } from '../../../models';
-import { ensure } from '../../../prelude/ensure';
export async function renderPerson(user: ILocalUser) {
const id = `${config.url}/users/${user.id}`;
@@ -18,7 +17,7 @@ export async function renderPerson(user: ILocalUser) {
const [avatar, banner, profile] = await Promise.all([
user.avatarId ? DriveFiles.findOne(user.avatarId) : Promise.resolve(undefined),
user.bannerId ? DriveFiles.findOne(user.bannerId) : Promise.resolve(undefined),
- UserProfiles.findOne(user.id).then(ensure)
+ UserProfiles.findOneOrFail(user.id)
]);
const attachment: {
@@ -50,7 +49,7 @@ export async function renderPerson(user: ILocalUser) {
...hashtagTags,
];
- const keypair = await UserKeypairs.findOne(user.id).then(ensure);
+ const keypair = await UserKeypairs.findOneOrFail(user.id);
const person = {
type: isSystem ? 'Application' : user.isBot ? 'Service' : 'Person',