This commit is contained in:
syuilo 2019-05-03 18:55:24 +09:00
parent 4b68abd963
commit 6b473e3a5c
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -127,6 +127,7 @@ export class UserRepository extends Repository<User> {
pinnedNotes: Notes.packMany(pins.map(pin => pin.noteId), meId, { pinnedNotes: Notes.packMany(pins.map(pin => pin.noteId), meId, {
detail: true detail: true
}), }),
twoFactorEnabled: profile!.twoFactorEnabled,
} : {}), } : {}),
...(opts.detail && meId === user.id ? { ...(opts.detail && meId === user.id ? {
@ -135,7 +136,6 @@ export class UserRepository extends Repository<User> {
autoWatch: profile!.autoWatch, autoWatch: profile!.autoWatch,
alwaysMarkNsfw: profile!.alwaysMarkNsfw, alwaysMarkNsfw: profile!.alwaysMarkNsfw,
carefulBot: profile!.carefulBot, carefulBot: profile!.carefulBot,
twoFactorEnabled: profile!.twoFactorEnabled,
hasUnreadMessagingMessage: MessagingMessages.count({ hasUnreadMessagingMessage: MessagingMessages.count({
where: { where: {
recipientId: user.id, recipientId: user.id,