Merge remote-tracking branch 'misskey-dev/develop' into io
This commit is contained in:
commit
d41a578235
|
@ -97,7 +97,7 @@ export class AccountMoveService {
|
||||||
await this.apDeliverManagerService.deliverToFollowers(src, moveAct);
|
await this.apDeliverManagerService.deliverToFollowers(src, moveAct);
|
||||||
|
|
||||||
// Publish meUpdated event
|
// Publish meUpdated event
|
||||||
const iObj = await this.userEntityService.pack<true, true>(src.id, src, { detail: true, includeSecrets: true });
|
const iObj = await this.userEntityService.pack(src.id, src, { schema: 'MeDetailed', includeSecrets: true });
|
||||||
this.globalEventService.publishMainStream(src.id, 'meUpdated', iObj);
|
this.globalEventService.publishMainStream(src.id, 'meUpdated', iObj);
|
||||||
|
|
||||||
// Unfollow after 24 hours
|
// Unfollow after 24 hours
|
||||||
|
|
|
@ -169,7 +169,7 @@ export class AnnouncementService {
|
||||||
id: In(announcements.map(a => a.userId).filter(id => id != null)),
|
id: In(announcements.map(a => a.userId).filter(id => id != null)),
|
||||||
});
|
});
|
||||||
const packedUsers = await this.userEntityService.packMany(users, moderator, {
|
const packedUsers = await this.userEntityService.packMany(users, moderator, {
|
||||||
detail: false,
|
schema: 'UserLite'
|
||||||
});
|
});
|
||||||
|
|
||||||
return announcements.map(announcement => ({
|
return announcements.map(announcement => ({
|
||||||
|
|
|
@ -54,15 +54,15 @@ export interface MainEventTypes {
|
||||||
reply: Packed<'Note'>;
|
reply: Packed<'Note'>;
|
||||||
renote: Packed<'Note'>;
|
renote: Packed<'Note'>;
|
||||||
follow: Packed<'UserDetailedNotMe'>;
|
follow: Packed<'UserDetailedNotMe'>;
|
||||||
followed: Packed<'UserDetailed' | 'UserLite'>;
|
followed: Packed<'UserLite'>;
|
||||||
unfollow: Packed<'UserDetailed'>;
|
unfollow: Packed<'UserDetailedNotMe'>;
|
||||||
meUpdated: Packed<'UserDetailed'>;
|
meUpdated: Packed<'MeDetailed'>;
|
||||||
pageEvent: {
|
pageEvent: {
|
||||||
pageId: MiPage['id'];
|
pageId: MiPage['id'];
|
||||||
event: string;
|
event: string;
|
||||||
var: any;
|
var: any;
|
||||||
userId: MiUser['id'];
|
userId: MiUser['id'];
|
||||||
user: Packed<'User'>;
|
user: Packed<'UserDetailed'>;
|
||||||
};
|
};
|
||||||
urlUploadFinished: {
|
urlUploadFinished: {
|
||||||
marker?: string | null;
|
marker?: string | null;
|
||||||
|
@ -92,7 +92,7 @@ export interface MainEventTypes {
|
||||||
};
|
};
|
||||||
driveFileCreated: Packed<'DriveFile'>;
|
driveFileCreated: Packed<'DriveFile'>;
|
||||||
readAntenna: MiAntenna;
|
readAntenna: MiAntenna;
|
||||||
receiveFollowRequest: Packed<'User'>;
|
receiveFollowRequest: Packed<'UserLite'>;
|
||||||
announcementCreated: {
|
announcementCreated: {
|
||||||
announcement: Packed<'Announcement'>;
|
announcement: Packed<'Announcement'>;
|
||||||
};
|
};
|
||||||
|
@ -140,8 +140,8 @@ type NoteStreamEventTypes = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface UserListEventTypes {
|
export interface UserListEventTypes {
|
||||||
userAdded: Packed<'User'>;
|
userAdded: Packed<'UserLite'>;
|
||||||
userRemoved: Packed<'User'>;
|
userRemoved: Packed<'UserLite'>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AntennaEventTypes {
|
export interface AntennaEventTypes {
|
||||||
|
|
|
@ -109,13 +109,13 @@ export class UserBlockingService implements OnModuleInit {
|
||||||
|
|
||||||
if (this.userEntityService.isLocalUser(followee)) {
|
if (this.userEntityService.isLocalUser(followee)) {
|
||||||
this.userEntityService.pack(followee, followee, {
|
this.userEntityService.pack(followee, followee, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
|
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.userEntityService.isLocalUser(follower) && !silent) {
|
if (this.userEntityService.isLocalUser(follower) && !silent) {
|
||||||
this.userEntityService.pack(followee, follower, {
|
this.userEntityService.pack(followee, follower, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
}).then(async packed => {
|
}).then(async packed => {
|
||||||
this.globalEventService.publishMainStream(follower.id, 'unfollow', packed);
|
this.globalEventService.publishMainStream(follower.id, 'unfollow', packed);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ import PerUserFollowingChart from '@/core/chart/charts/per-user-following.js';
|
||||||
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
import { GlobalEventService } from '@/core/GlobalEventService.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
|
import { isDuplicateKeyValueError } from '@/misc/is-duplicate-key-value-error.js';
|
||||||
import type { Packed } from '@/misc/json-schema.js';
|
|
||||||
import InstanceChart from '@/core/chart/charts/instance.js';
|
import InstanceChart from '@/core/chart/charts/instance.js';
|
||||||
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
|
import { FederatedInstanceService } from '@/core/FederatedInstanceService.js';
|
||||||
import { WebhookService } from '@/core/WebhookService.js';
|
import { WebhookService } from '@/core/WebhookService.js';
|
||||||
|
@ -293,9 +292,9 @@ export class UserFollowingService implements OnModuleInit {
|
||||||
if (this.userEntityService.isLocalUser(follower) && !silent) {
|
if (this.userEntityService.isLocalUser(follower) && !silent) {
|
||||||
// Publish follow event
|
// Publish follow event
|
||||||
this.userEntityService.pack(followee.id, follower, {
|
this.userEntityService.pack(followee.id, follower, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
}).then(async packed => {
|
}).then(async packed => {
|
||||||
this.globalEventService.publishMainStream(follower.id, 'follow', packed as Packed<'UserDetailedNotMe'>);
|
this.globalEventService.publishMainStream(follower.id, 'follow', packed);
|
||||||
|
|
||||||
const webhooks = (await this.webhookService.getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('follow'));
|
const webhooks = (await this.webhookService.getActiveWebhooks()).filter(x => x.userId === follower.id && x.on.includes('follow'));
|
||||||
for (const webhook of webhooks) {
|
for (const webhook of webhooks) {
|
||||||
|
@ -360,7 +359,7 @@ export class UserFollowingService implements OnModuleInit {
|
||||||
if (!silent && this.userEntityService.isLocalUser(follower)) {
|
if (!silent && this.userEntityService.isLocalUser(follower)) {
|
||||||
// Publish unfollow event
|
// Publish unfollow event
|
||||||
this.userEntityService.pack(followee.id, follower, {
|
this.userEntityService.pack(followee.id, follower, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
}).then(async packed => {
|
}).then(async packed => {
|
||||||
this.globalEventService.publishMainStream(follower.id, 'unfollow', packed);
|
this.globalEventService.publishMainStream(follower.id, 'unfollow', packed);
|
||||||
|
|
||||||
|
@ -500,7 +499,7 @@ export class UserFollowingService implements OnModuleInit {
|
||||||
this.userEntityService.pack(follower.id, followee).then(packed => this.globalEventService.publishMainStream(followee.id, 'receiveFollowRequest', packed));
|
this.userEntityService.pack(follower.id, followee).then(packed => this.globalEventService.publishMainStream(followee.id, 'receiveFollowRequest', packed));
|
||||||
|
|
||||||
this.userEntityService.pack(followee.id, followee, {
|
this.userEntityService.pack(followee.id, followee, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
|
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
|
||||||
|
|
||||||
// 通知を作成
|
// 通知を作成
|
||||||
|
@ -548,7 +547,7 @@ export class UserFollowingService implements OnModuleInit {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.userEntityService.pack(followee.id, followee, {
|
this.userEntityService.pack(followee.id, followee, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
|
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -576,7 +575,7 @@ export class UserFollowingService implements OnModuleInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.userEntityService.pack(followee.id, followee, {
|
this.userEntityService.pack(followee.id, followee, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
|
}).then(packed => this.globalEventService.publishMainStream(followee.id, 'meUpdated', packed));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,7 +695,7 @@ export class UserFollowingService implements OnModuleInit {
|
||||||
@bindThis
|
@bindThis
|
||||||
private async publishUnfollow(followee: Both, follower: Local): Promise<void> {
|
private async publishUnfollow(followee: Both, follower: Local): Promise<void> {
|
||||||
const packedFollowee = await this.userEntityService.pack(followee.id, follower, {
|
const packedFollowee = await this.userEntityService.pack(followee.id, follower, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
});
|
});
|
||||||
|
|
||||||
this.globalEventService.publishMainStream(follower.id, 'unfollow', packedFollowee);
|
this.globalEventService.publishMainStream(follower.id, 'unfollow', packedFollowee);
|
||||||
|
|
|
@ -41,13 +41,13 @@ export class AbuseUserReportEntityService {
|
||||||
targetUserId: report.targetUserId,
|
targetUserId: report.targetUserId,
|
||||||
assigneeId: report.assigneeId,
|
assigneeId: report.assigneeId,
|
||||||
reporter: this.userEntityService.pack(report.reporter ?? report.reporterId, me, {
|
reporter: this.userEntityService.pack(report.reporter ?? report.reporterId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
}),
|
}),
|
||||||
targetUser: this.userEntityService.pack(report.targetUser ?? report.targetUserId, me, {
|
targetUser: this.userEntityService.pack(report.targetUser ?? report.targetUserId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
}),
|
}),
|
||||||
assignee: report.assigneeId ? this.userEntityService.pack(report.assignee ?? report.assigneeId, me, {
|
assignee: report.assigneeId ? this.userEntityService.pack(report.assignee ?? report.assigneeId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
}) : null,
|
}) : null,
|
||||||
forwarded: report.forwarded,
|
forwarded: report.forwarded,
|
||||||
category: report.category,
|
category: report.category,
|
||||||
|
|
|
@ -37,7 +37,7 @@ export class BlockingEntityService {
|
||||||
createdAt: this.idService.parse(blocking.id).date.toISOString(),
|
createdAt: this.idService.parse(blocking.id).date.toISOString(),
|
||||||
blockeeId: blocking.blockeeId,
|
blockeeId: blocking.blockeeId,
|
||||||
blockee: this.userEntityService.pack(blocking.blockeeId, me, {
|
blockee: this.userEntityService.pack(blocking.blockeeId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class FlashEntityService {
|
||||||
createdAt: this.idService.parse(flash.id).date.toISOString(),
|
createdAt: this.idService.parse(flash.id).date.toISOString(),
|
||||||
updatedAt: flash.updatedAt.toISOString(),
|
updatedAt: flash.updatedAt.toISOString(),
|
||||||
userId: flash.userId,
|
userId: flash.userId,
|
||||||
user: this.userEntityService.pack(flash.user ?? flash.userId, me), // { detail: true } すると無限ループするので注意
|
user: this.userEntityService.pack(flash.user ?? flash.userId, me), // { schema: 'UserDetailed' } すると無限ループするので注意
|
||||||
title: flash.title,
|
title: flash.title,
|
||||||
summary: flash.summary,
|
summary: flash.summary,
|
||||||
script: flash.script,
|
script: flash.script,
|
||||||
|
|
|
@ -88,10 +88,10 @@ export class FollowingEntityService {
|
||||||
followeeId: following.followeeId,
|
followeeId: following.followeeId,
|
||||||
followerId: following.followerId,
|
followerId: following.followerId,
|
||||||
followee: opts.populateFollowee ? this.userEntityService.pack(following.followee ?? following.followeeId, me, {
|
followee: opts.populateFollowee ? this.userEntityService.pack(following.followee ?? following.followeeId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
}) : undefined,
|
}) : undefined,
|
||||||
follower: opts.populateFollower ? this.userEntityService.pack(following.follower ?? following.followerId, me, {
|
follower: opts.populateFollower ? this.userEntityService.pack(following.follower ?? following.followerId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
}) : undefined,
|
}) : undefined,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ export class ModerationLogEntityService {
|
||||||
info: log.info,
|
info: log.info,
|
||||||
userId: log.userId,
|
userId: log.userId,
|
||||||
user: this.userEntityService.pack(log.user ?? log.userId, me, {
|
user: this.userEntityService.pack(log.user ?? log.userId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ export class MutingEntityService {
|
||||||
expiresAt: muting.expiresAt ? muting.expiresAt.toISOString() : null,
|
expiresAt: muting.expiresAt ? muting.expiresAt.toISOString() : null,
|
||||||
muteeId: muting.muteeId,
|
muteeId: muting.muteeId,
|
||||||
mutee: this.userEntityService.pack(muting.muteeId, me, {
|
mutee: this.userEntityService.pack(muting.muteeId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -329,9 +329,7 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
id: note.id,
|
id: note.id,
|
||||||
createdAt: this.idService.parse(note.id).date.toISOString(),
|
createdAt: this.idService.parse(note.id).date.toISOString(),
|
||||||
userId: note.userId,
|
userId: note.userId,
|
||||||
user: this.userEntityService.pack(note.user ?? note.userId, me, {
|
user: this.userEntityService.pack(note.user ?? note.userId, me),
|
||||||
detail: false,
|
|
||||||
}),
|
|
||||||
text: text,
|
text: text,
|
||||||
cw: note.cw,
|
cw: note.cw,
|
||||||
visibility: note.visibility,
|
visibility: note.visibility,
|
||||||
|
|
|
@ -62,7 +62,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
},
|
},
|
||||||
hint?: {
|
hint?: {
|
||||||
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
|
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
|
||||||
packedUsers: Map<MiUser['id'], Packed<'User'>>;
|
packedUsers: Map<MiUser['id'], Packed<'UserLite'>>;
|
||||||
},
|
},
|
||||||
): Promise<Packed<'Notification'>> {
|
): Promise<Packed<'Notification'>> {
|
||||||
const notification = src;
|
const notification = src;
|
||||||
|
@ -76,9 +76,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
const userIfNeed = 'notifierId' in notification ? (
|
const userIfNeed = 'notifierId' in notification ? (
|
||||||
hint?.packedUsers != null
|
hint?.packedUsers != null
|
||||||
? hint.packedUsers.get(notification.notifierId)
|
? hint.packedUsers.get(notification.notifierId)
|
||||||
: this.userEntityService.pack(notification.notifierId, { id: meId }, {
|
: this.userEntityService.pack(notification.notifierId, { id: meId })
|
||||||
detail: false,
|
|
||||||
})
|
|
||||||
) : undefined;
|
) : undefined;
|
||||||
const role = notification.type === 'roleAssigned' ? await this.roleEntityService.pack(notification.roleId, { id: meId }) : undefined;
|
const role = notification.type === 'roleAssigned' ? await this.roleEntityService.pack(notification.roleId, { id: meId }) : undefined;
|
||||||
|
|
||||||
|
@ -131,9 +129,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
const users = userIds.length > 0 ? await this.usersRepository.find({
|
const users = userIds.length > 0 ? await this.usersRepository.find({
|
||||||
where: { id: In(userIds) },
|
where: { id: In(userIds) },
|
||||||
}) : [];
|
}) : [];
|
||||||
const packedUsersArray = await this.userEntityService.packMany(users, { id: meId }, {
|
const packedUsersArray = await this.userEntityService.packMany(users, { id: meId });
|
||||||
detail: false,
|
|
||||||
});
|
|
||||||
const packedUsers = new Map(packedUsersArray.map(p => [p.id, p]));
|
const packedUsers = new Map(packedUsersArray.map(p => [p.id, p]));
|
||||||
|
|
||||||
// 既に解決されたフォローリクエストの通知を除外
|
// 既に解決されたフォローリクエストの通知を除外
|
||||||
|
@ -160,7 +156,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
},
|
},
|
||||||
hint?: {
|
hint?: {
|
||||||
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
|
packedNotes: Map<MiNote['id'], Packed<'Note'>>;
|
||||||
packedUsers: Map<MiUser['id'], Packed<'User'>>;
|
packedUsers: Map<MiUser['id'], Packed<'UserLite'>>;
|
||||||
},
|
},
|
||||||
): Promise<Packed<'Notification'>> {
|
): Promise<Packed<'Notification'>> {
|
||||||
const notification = src;
|
const notification = src;
|
||||||
|
@ -174,18 +170,14 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
const userIfNeed = 'notifierId' in notification ? (
|
const userIfNeed = 'notifierId' in notification ? (
|
||||||
hint?.packedUsers != null
|
hint?.packedUsers != null
|
||||||
? hint.packedUsers.get(notification.notifierId)
|
? hint.packedUsers.get(notification.notifierId)
|
||||||
: this.userEntityService.pack(notification.notifierId, { id: meId }, {
|
: this.userEntityService.pack(notification.notifierId, { id: meId })
|
||||||
detail: false,
|
|
||||||
})
|
|
||||||
) : undefined;
|
) : undefined;
|
||||||
|
|
||||||
if (notification.type === 'reaction:grouped') {
|
if (notification.type === 'reaction:grouped') {
|
||||||
const reactions = await Promise.allSettled(notification.reactions.map(async reaction => {
|
const reactions = await Promise.allSettled(notification.reactions.map(async reaction => {
|
||||||
const user = hint?.packedUsers != null
|
const user = hint?.packedUsers != null
|
||||||
? hint.packedUsers.get(reaction.userId)!
|
? hint.packedUsers.get(reaction.userId)!
|
||||||
: await this.userEntityService.pack(reaction.userId, { id: meId }, {
|
: await this.userEntityService.pack(reaction.userId, { id: meId });
|
||||||
detail: false,
|
|
||||||
});
|
|
||||||
return {
|
return {
|
||||||
user,
|
user,
|
||||||
reaction: reaction.reaction,
|
reaction: reaction.reaction,
|
||||||
|
@ -206,9 +198,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
return packedUser;
|
return packedUser;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.userEntityService.pack(userId, { id: meId }, {
|
return this.userEntityService.pack(userId, { id: meId });
|
||||||
detail: false,
|
|
||||||
});
|
|
||||||
}));
|
}));
|
||||||
return await awaitAll({
|
return await awaitAll({
|
||||||
id: notification.id,
|
id: notification.id,
|
||||||
|
@ -276,9 +266,7 @@ export class NotificationEntityService implements OnModuleInit {
|
||||||
const users = userIds.length > 0 ? await this.usersRepository.find({
|
const users = userIds.length > 0 ? await this.usersRepository.find({
|
||||||
where: { id: In(userIds) },
|
where: { id: In(userIds) },
|
||||||
}) : [];
|
}) : [];
|
||||||
const packedUsersArray = await this.userEntityService.packMany(users, { id: meId }, {
|
const packedUsersArray = await this.userEntityService.packMany(users, { id: meId });
|
||||||
detail: false,
|
|
||||||
});
|
|
||||||
const packedUsers = new Map(packedUsersArray.map(p => [p.id, p]));
|
const packedUsers = new Map(packedUsersArray.map(p => [p.id, p]));
|
||||||
|
|
||||||
// 既に解決されたフォローリクエストの通知を除外
|
// 既に解決されたフォローリクエストの通知を除外
|
||||||
|
|
|
@ -89,7 +89,7 @@ export class PageEntityService {
|
||||||
createdAt: this.idService.parse(page.id).date.toISOString(),
|
createdAt: this.idService.parse(page.id).date.toISOString(),
|
||||||
updatedAt: page.updatedAt.toISOString(),
|
updatedAt: page.updatedAt.toISOString(),
|
||||||
userId: page.userId,
|
userId: page.userId,
|
||||||
user: this.userEntityService.pack(page.user ?? page.userId, me), // { detail: true } すると無限ループするので注意
|
user: this.userEntityService.pack(page.user ?? page.userId, me), // { schema: 'UserDetailed' } すると無限ループするので注意
|
||||||
content: page.content,
|
content: page.content,
|
||||||
variables: page.variables,
|
variables: page.variables,
|
||||||
title: page.title,
|
title: page.title,
|
||||||
|
|
|
@ -37,7 +37,7 @@ export class RenoteMutingEntityService {
|
||||||
createdAt: this.idService.parse(muting.id).date.toISOString(),
|
createdAt: this.idService.parse(muting.id).date.toISOString(),
|
||||||
muteeId: muting.muteeId,
|
muteeId: muting.muteeId,
|
||||||
mutee: this.userEntityService.pack(muting.muteeId, me, {
|
mutee: this.userEntityService.pack(muting.muteeId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,14 +31,6 @@ import type { NoteEntityService } from './NoteEntityService.js';
|
||||||
import type { DriveFileEntityService } from './DriveFileEntityService.js';
|
import type { DriveFileEntityService } from './DriveFileEntityService.js';
|
||||||
import type { PageEntityService } from './PageEntityService.js';
|
import type { PageEntityService } from './PageEntityService.js';
|
||||||
|
|
||||||
type IsUserDetailed<Detailed extends boolean> = Detailed extends true ? Packed<'UserDetailed'> : Packed<'UserLite'>;
|
|
||||||
type IsMeAndIsUserDetailed<ExpectsMe extends boolean | null, Detailed extends boolean> =
|
|
||||||
Detailed extends true ?
|
|
||||||
ExpectsMe extends true ? Packed<'MeDetailed'> :
|
|
||||||
ExpectsMe extends false ? Packed<'UserDetailedNotMe'> :
|
|
||||||
Packed<'UserDetailed'> :
|
|
||||||
Packed<'UserLite'>;
|
|
||||||
|
|
||||||
const Ajv = _Ajv.default;
|
const Ajv = _Ajv.default;
|
||||||
const ajv = new Ajv();
|
const ajv = new Ajv();
|
||||||
|
|
||||||
|
@ -304,34 +296,35 @@ export class UserEntityService implements OnModuleInit {
|
||||||
return `${this.config.url}/users/${userId}`;
|
return `${this.config.url}/users/${userId}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async pack<ExpectsMe extends boolean | null = null, D extends boolean = false>(
|
public async pack<S extends 'MeDetailed' | 'UserDetailedNotMe' | 'UserDetailed' | 'UserLite' = 'UserLite'>(
|
||||||
src: MiUser['id'] | MiUser,
|
src: MiUser['id'] | MiUser,
|
||||||
me: { id: MiUser['id'] } | null | undefined,
|
me: { id: MiUser['id'] } | null | undefined,
|
||||||
options?: {
|
options?: {
|
||||||
detail?: D,
|
schema?: S,
|
||||||
includeSecrets?: boolean,
|
includeSecrets?: boolean,
|
||||||
userProfile?: MiUserProfile,
|
userProfile?: MiUserProfile,
|
||||||
},
|
},
|
||||||
): Promise<IsMeAndIsUserDetailed<ExpectsMe, D>> {
|
): Promise<Packed<S>> {
|
||||||
const opts = Object.assign({
|
const opts = Object.assign({
|
||||||
detail: false,
|
schema: 'UserLite',
|
||||||
includeSecrets: false,
|
includeSecrets: false,
|
||||||
}, options);
|
}, options);
|
||||||
|
|
||||||
const user = typeof src === 'object' ? src : await this.usersRepository.findOneByOrFail({ id: src });
|
const user = typeof src === 'object' ? src : await this.usersRepository.findOneByOrFail({ id: src });
|
||||||
|
|
||||||
|
const isDetailed = opts.schema !== 'UserLite';
|
||||||
const meId = me ? me.id : null;
|
const meId = me ? me.id : null;
|
||||||
const isMe = meId === user.id;
|
const isMe = meId === user.id;
|
||||||
const iAmModerator = me ? await this.roleService.isModerator(me as MiUser) : false;
|
const iAmModerator = me ? await this.roleService.isModerator(me as MiUser) : false;
|
||||||
if (user.isSuspended && !iAmModerator) throw new IdentifiableError('8ca4f428-b32e-4f83-ac43-406ed7cd0452', 'This user is suspended.');
|
if (user.isSuspended && !iAmModerator) throw new IdentifiableError('8ca4f428-b32e-4f83-ac43-406ed7cd0452', 'This user is suspended.');
|
||||||
|
|
||||||
const relation = meId && !isMe && opts.detail ? await this.getRelation(meId, user.id) : null;
|
const relation = meId && !isMe && isDetailed ? await this.getRelation(meId, user.id) : null;
|
||||||
const pins = opts.detail ? await this.userNotePiningsRepository.createQueryBuilder('pin')
|
const pins = isDetailed ? await this.userNotePiningsRepository.createQueryBuilder('pin')
|
||||||
.where('pin.userId = :userId', { userId: user.id })
|
.where('pin.userId = :userId', { userId: user.id })
|
||||||
.innerJoinAndSelect('pin.note', 'note')
|
.innerJoinAndSelect('pin.note', 'note')
|
||||||
.orderBy('pin.id', 'DESC')
|
.orderBy('pin.id', 'DESC')
|
||||||
.getMany() : [];
|
.getMany() : [];
|
||||||
const profile = opts.detail ? (opts.userProfile ?? await this.userProfilesRepository.findOneByOrFail({ userId: user.id })) : null;
|
const profile = isDetailed ? (opts.userProfile ?? await this.userProfilesRepository.findOneByOrFail({ userId: user.id })) : null;
|
||||||
|
|
||||||
const followingCount = profile == null ? null :
|
const followingCount = profile == null ? null :
|
||||||
(profile.followingVisibility === 'public') || isMe ? user.followingCount :
|
(profile.followingVisibility === 'public') || isMe ? user.followingCount :
|
||||||
|
@ -343,12 +336,12 @@ export class UserEntityService implements OnModuleInit {
|
||||||
(profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount :
|
(profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount :
|
||||||
null;
|
null;
|
||||||
|
|
||||||
const policies = opts.detail ? await this.roleService.getUserPolicies(user.id) : null;
|
const policies = isDetailed ? await this.roleService.getUserPolicies(user.id) : null;
|
||||||
const isModerator = (isMe || iAmModerator) && opts.detail ? this.roleService.isModerator(user) : null;
|
const isModerator = (isMe || iAmModerator) && isDetailed ? this.roleService.isModerator(user) : null;
|
||||||
const isAdmin = (isMe || iAmModerator) && opts.detail ? this.roleService.isAdministrator(user) : null;
|
const isAdmin = (isMe || iAmModerator) && isDetailed ? this.roleService.isAdministrator(user) : null;
|
||||||
const unreadAnnouncements = isMe && opts.detail ? await this.announcementService.getUnreadAnnouncements(user) : null;
|
const unreadAnnouncements = isMe && isDetailed ? await this.announcementService.getUnreadAnnouncements(user) : null;
|
||||||
|
|
||||||
const notificationsInfo = isMe && opts.detail ? await this.getNotificationsInfo(user.id) : null;
|
const notificationsInfo = isMe && isDetailed ? await this.getNotificationsInfo(user.id) : null;
|
||||||
|
|
||||||
const packed = {
|
const packed = {
|
||||||
id: user.id,
|
id: user.id,
|
||||||
|
@ -384,7 +377,7 @@ export class UserEntityService implements OnModuleInit {
|
||||||
displayOrder: r.displayOrder,
|
displayOrder: r.displayOrder,
|
||||||
}))) : undefined,
|
}))) : undefined,
|
||||||
|
|
||||||
...(opts.detail ? {
|
...(isDetailed ? {
|
||||||
url: profile!.url,
|
url: profile!.url,
|
||||||
uri: user.uri,
|
uri: user.uri,
|
||||||
movedTo: user.movedToUri ? this.apPersonService.resolvePerson(user.movedToUri).then(user => user.id).catch(() => null) : null,
|
movedTo: user.movedToUri ? this.apPersonService.resolvePerson(user.movedToUri).then(user => user.id).catch(() => null) : null,
|
||||||
|
@ -447,7 +440,7 @@ export class UserEntityService implements OnModuleInit {
|
||||||
moderationNote: iAmModerator ? (profile!.moderationNote ?? '') : undefined,
|
moderationNote: iAmModerator ? (profile!.moderationNote ?? '') : undefined,
|
||||||
} : {}),
|
} : {}),
|
||||||
|
|
||||||
...(opts.detail && (isMe || iAmModerator) ? {
|
...(isDetailed && (isMe || iAmModerator) ? {
|
||||||
avatarId: user.avatarId,
|
avatarId: user.avatarId,
|
||||||
bannerId: user.bannerId,
|
bannerId: user.bannerId,
|
||||||
isModerator: isModerator,
|
isModerator: isModerator,
|
||||||
|
@ -518,21 +511,21 @@ export class UserEntityService implements OnModuleInit {
|
||||||
notify: relation.following?.notify ?? 'none',
|
notify: relation.following?.notify ?? 'none',
|
||||||
withReplies: relation.following?.withReplies ?? false,
|
withReplies: relation.following?.withReplies ?? false,
|
||||||
} : {}),
|
} : {}),
|
||||||
} as Promiseable<Packed<'User'>> as Promiseable<IsMeAndIsUserDetailed<ExpectsMe, D>>;
|
} as Promiseable<Packed<S>>;
|
||||||
|
|
||||||
return await awaitAll(packed);
|
return await awaitAll(packed);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async packMany<D extends boolean = false>(
|
public async packMany<S extends 'MeDetailed' | 'UserDetailedNotMe' | 'UserDetailed' | 'UserLite' = 'UserLite'>(
|
||||||
users: (MiUser['id'] | MiUser)[],
|
users: (MiUser['id'] | MiUser)[],
|
||||||
me: { id: MiUser['id'] } | null | undefined,
|
me: { id: MiUser['id'] } | null | undefined,
|
||||||
options?: {
|
options?: {
|
||||||
detail?: D,
|
schema?: S,
|
||||||
includeSecrets?: boolean,
|
includeSecrets?: boolean,
|
||||||
},
|
},
|
||||||
): Promise<IsUserDetailed<D>[]> {
|
): Promise<Packed<S>[]> {
|
||||||
return (await Promise.allSettled(users.map(u => this.pack(u, me, options))))
|
return (await Promise.allSettled(users.map(u => this.pack(u, me, options))))
|
||||||
.filter(result => result.status === 'fulfilled')
|
.filter(result => result.status === 'fulfilled')
|
||||||
.map(result => (result as PromiseFulfilledResult<IsUserDetailed<D>>).value);
|
.map(result => (result as PromiseFulfilledResult<Packed<S>>).value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const packedBlockingSchema = {
|
||||||
blockee: {
|
blockee: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
ref: 'UserDetailed',
|
ref: 'UserDetailedNotMe',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -30,12 +30,12 @@ export const packedFollowingSchema = {
|
||||||
followee: {
|
followee: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: true, nullable: false,
|
optional: true, nullable: false,
|
||||||
ref: 'UserDetailed',
|
ref: 'UserDetailedNotMe',
|
||||||
},
|
},
|
||||||
follower: {
|
follower: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: true, nullable: false,
|
optional: true, nullable: false,
|
||||||
ref: 'UserDetailed',
|
ref: 'UserDetailedNotMe',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -30,7 +30,7 @@ export const packedMutingSchema = {
|
||||||
mutee: {
|
mutee: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
ref: 'UserDetailed',
|
ref: 'UserDetailedNotMe',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const packedRenoteMutingSchema = {
|
||||||
mutee: {
|
mutee: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
ref: 'UserDetailed',
|
ref: 'UserDetailedNotMe',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -677,13 +677,5 @@ export const packedUserSchema = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
ref: 'UserDetailed',
|
ref: 'UserDetailed',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
type: 'object',
|
|
||||||
ref: 'UserDetailedNotMe',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: 'object',
|
|
||||||
ref: 'MeDetailed',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
|
@ -211,7 +211,7 @@ export class ServerService implements OnApplicationShutdown {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.globalEventService.publishMainStream(profile.userId, 'meUpdated', await this.userEntityService.pack(profile.userId, { id: profile.userId }, {
|
this.globalEventService.publishMainStream(profile.userId, 'meUpdated', await this.userEntityService.pack(profile.userId, { id: profile.userId }, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ export class ApiServerService {
|
||||||
return {
|
return {
|
||||||
ok: true,
|
ok: true,
|
||||||
token: token.token,
|
token: token.token,
|
||||||
user: await this.userEntityService.pack(token.userId, { id: token.userId }, { detail: true }),
|
user: await this.userEntityService.pack(token.userId, { id: token.userId }, { schema: 'UserDetailed' }),
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -213,7 +213,7 @@ export class SignupApiService {
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await this.userEntityService.pack(account, account, {
|
const res = await this.userEntityService.pack(account, account, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -62,17 +62,17 @@ export const meta = {
|
||||||
reporter: {
|
reporter: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
ref: 'User',
|
ref: 'UserDetailed',
|
||||||
},
|
},
|
||||||
targetUser: {
|
targetUser: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
ref: 'User',
|
ref: 'UserDetailed',
|
||||||
},
|
},
|
||||||
assignee: {
|
assignee: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
nullable: true, optional: true,
|
nullable: true, optional: true,
|
||||||
ref: 'User',
|
ref: 'UserDetailed',
|
||||||
},
|
},
|
||||||
category: {
|
category: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|
|
@ -11,6 +11,7 @@ import { SignupService } from '@/core/SignupService.js';
|
||||||
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
import { UserEntityService } from '@/core/entities/UserEntityService.js';
|
||||||
import { localUsernameSchema, passwordSchema } from '@/models/User.js';
|
import { localUsernameSchema, passwordSchema } from '@/models/User.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
|
import { Packed } from '@/misc/json-schema.js';
|
||||||
|
|
||||||
export const meta = {
|
export const meta = {
|
||||||
tags: ['admin'],
|
tags: ['admin'],
|
||||||
|
@ -18,7 +19,7 @@ export const meta = {
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
ref: 'User',
|
ref: 'MeDetailed',
|
||||||
properties: {
|
properties: {
|
||||||
token: {
|
token: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
@ -60,11 +61,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
});
|
});
|
||||||
|
|
||||||
const res = await this.userEntityService.pack(account, account, {
|
const res = await this.userEntityService.pack(account, account, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
});
|
}) as Packed<'MeDetailed'> & { token: string };
|
||||||
|
|
||||||
(res as any).token = secret;
|
res.token = secret;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,7 +27,7 @@ export const meta = {
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
ref: 'User',
|
ref: 'UserDetailed',
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await this.userEntityService.pack(profile.user!, null, {
|
const res = await this.userEntityService.pack(profile.user!, null, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
});
|
});
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
|
|
@ -40,7 +40,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
required: ['id', 'createdAt', 'user'],
|
required: ['id', 'createdAt', 'user'],
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
@ -92,7 +92,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
return await Promise.all(assigns.map(async assign => ({
|
return await Promise.all(assigns.map(async assign => ({
|
||||||
id: assign.id,
|
id: assign.id,
|
||||||
createdAt: this.idService.parse(assign.id).date.toISOString(),
|
createdAt: this.idService.parse(assign.id).date.toISOString(),
|
||||||
user: await this.userEntityService.pack(assign.user!, me, { detail: true }),
|
user: await this.userEntityService.pack(assign.user!, me, { schema: 'UserDetailed' }),
|
||||||
expiresAt: assign.expiresAt?.toISOString() ?? null,
|
expiresAt: assign.expiresAt?.toISOString() ?? null,
|
||||||
})));
|
})));
|
||||||
});
|
});
|
||||||
|
|
|
@ -114,7 +114,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
const users = await query.getMany();
|
const users = await query.getMany();
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users, me, { detail: true });
|
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,7 +148,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
if (user != null) {
|
if (user != null) {
|
||||||
return {
|
return {
|
||||||
type: 'User',
|
type: 'User',
|
||||||
object: await this.userEntityService.pack(user, me, { detail: true }),
|
object: await this.userEntityService.pack(user, me, { schema: 'UserDetailedNotMe' }),
|
||||||
};
|
};
|
||||||
} else if (note != null) {
|
} else if (note != null) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -27,7 +27,7 @@ export const meta = {
|
||||||
user: {
|
user: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
ref: 'UserDetailedNotMe',
|
ref: 'UserDetailed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -112,7 +112,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
return {
|
return {
|
||||||
accessToken: accessToken.token,
|
accessToken: accessToken.token,
|
||||||
user: await this.userEntityService.pack(session.userId, me, {
|
user: await this.userEntityService.pack(session.userId, me, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -103,7 +103,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
await this.userBlockingService.block(blocker, blockee);
|
await this.userBlockingService.block(blocker, blockee);
|
||||||
|
|
||||||
return await this.userEntityService.pack(blockee.id, blocker, {
|
return await this.userEntityService.pack(blockee.id, blocker, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
await this.userBlockingService.unblock(blocker, blockee);
|
await this.userBlockingService.unblock(blocker, blockee);
|
||||||
|
|
||||||
return await this.userEntityService.pack(blockee.id, blocker, {
|
return await this.userEntityService.pack(blockee.id, blocker, {
|
||||||
detail: true,
|
schema: 'UserDetailedNotMe',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
relations: ['user'],
|
relations: ['user'],
|
||||||
});
|
});
|
||||||
|
|
||||||
const users = await this.userEntityService.packMany(records.map(r => r.user!), null, { detail: false });
|
const users = await this.userEntityService.packMany(records.map(r => r.user!), null);
|
||||||
|
|
||||||
return records.map(r => ({
|
return records.map(r => ({
|
||||||
id: r.id,
|
id: r.id,
|
||||||
|
|
|
@ -54,7 +54,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.limit(ps.limit)
|
.limit(ps.limit)
|
||||||
.getMany();
|
.getMany();
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users, me, { detail: true });
|
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailedNotMe' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,7 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
const users = await query.limit(ps.limit).getMany();
|
const users = await query.limit(ps.limit).getMany();
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users, me, { detail: true });
|
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,8 +71,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
userProfile.loggedInDates = [...userProfile.loggedInDates, today];
|
userProfile.loggedInDates = [...userProfile.loggedInDates, today];
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.userEntityService.pack<true, true>(userProfile.user!, userProfile.user!, {
|
return await this.userEntityService.pack(userProfile.user!, userProfile.user!, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: isSecure,
|
includeSecrets: isSecure,
|
||||||
userProfile,
|
userProfile,
|
||||||
});
|
});
|
||||||
|
|
|
@ -64,7 +64,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
// Publish meUpdated event
|
// Publish meUpdated event
|
||||||
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -111,7 +111,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
||||||
|
|
||||||
// Publish meUpdated event
|
// Publish meUpdated event
|
||||||
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
// Publish meUpdated event
|
// Publish meUpdated event
|
||||||
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -99,7 +99,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
// Publish meUpdated event
|
// Publish meUpdated event
|
||||||
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
// Publish meUpdated event
|
// Publish meUpdated event
|
||||||
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -69,7 +69,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
// Publish meUpdated event
|
// Publish meUpdated event
|
||||||
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
this.globalEventService.publishMainStream(me.id, 'meUpdated', await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
|
@ -68,8 +68,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
throw err;
|
throw err;
|
||||||
});
|
});
|
||||||
|
|
||||||
return await this.userEntityService.pack<true, true>(me.id, me, {
|
return await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,8 +52,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
throw err;
|
throw err;
|
||||||
});
|
});
|
||||||
|
|
||||||
return await this.userEntityService.pack<true, true>(me.id, me, {
|
return await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ export const meta = {
|
||||||
|
|
||||||
res: {
|
res: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
ref: 'UserDetailed',
|
ref: 'MeDetailed',
|
||||||
},
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
});
|
});
|
||||||
|
|
||||||
const iObj = await this.userEntityService.pack(me.id, me, {
|
const iObj = await this.userEntityService.pack(me.id, me, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: true,
|
includeSecrets: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -433,8 +433,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
verifiedLinks: [],
|
verifiedLinks: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
const iObj = await this.userEntityService.pack<true, true>(user.id, user, {
|
const iObj = await this.userEntityService.pack(user.id, user, {
|
||||||
detail: true,
|
schema: 'MeDetailed',
|
||||||
includeSecrets: isSecure,
|
includeSecrets: isSecure,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
var: ps.var,
|
var: ps.var,
|
||||||
userId: me.id,
|
userId: me.id,
|
||||||
user: await this.userEntityService.pack(me.id, { id: page.userId }, {
|
user: await this.userEntityService.pack(me.id, { id: page.userId }, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -52,7 +52,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
host: acct.host ?? IsNull(),
|
host: acct.host ?? IsNull(),
|
||||||
})));
|
})));
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users.filter(x => x !== null) as MiUser[], me, { detail: true });
|
return await this.userEntityService.packMany(users.filter(x => x !== null) as MiUser[], me, { schema: 'UserDetailed' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,11 +33,11 @@ export const meta = {
|
||||||
properties: {
|
properties: {
|
||||||
id: {
|
id: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
format: 'misskey:id'
|
format: 'misskey:id',
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
ref: 'User'
|
ref: 'UserDetailed',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
required: ['id', 'user'],
|
required: ['id', 'user'],
|
||||||
|
@ -94,7 +94,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
return await Promise.all(assigns.map(async assign => ({
|
return await Promise.all(assigns.map(async assign => ({
|
||||||
id: assign.id,
|
id: assign.id,
|
||||||
user: await this.userEntityService.pack(assign.user!, me, { detail: true }),
|
user: await this.userEntityService.pack(assign.user!, me, { schema: 'UserDetailed' }),
|
||||||
})));
|
})));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
const users = await query.getMany();
|
const users = await query.getMany();
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users, me, { detail: true });
|
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -132,7 +132,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
// Make replies object (includes weights)
|
// Make replies object (includes weights)
|
||||||
const repliesObj = await Promise.all(topRepliedUsers.map(async (user) => ({
|
const repliesObj = await Promise.all(topRepliedUsers.map(async (user) => ({
|
||||||
user: await this.userEntityService.pack(user, me, { detail: true }),
|
user: await this.userEntityService.pack(user, me, { schema: 'UserDetailed' }),
|
||||||
weight: repliedUsers[user] / peak,
|
weight: repliedUsers[user] / peak,
|
||||||
})));
|
})));
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ export const meta = {
|
||||||
},
|
},
|
||||||
user: {
|
user: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
ref: 'User',
|
ref: 'UserLite',
|
||||||
},
|
},
|
||||||
withReplies: {
|
withReplies: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|
|
@ -76,7 +76,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
const users = await query.limit(ps.limit).offset(ps.offset).getMany();
|
const users = await query.limit(ps.limit).offset(ps.offset).getMany();
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users, me, { detail: true });
|
return await this.userEntityService.packMany(users, me, { schema: 'UserDetailed' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -131,7 +131,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
.getMany();
|
.getMany();
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users, me, { detail: !!ps.detail });
|
return await this.userEntityService.packMany(users, me, { schema: ps.detail ? 'UserDetailed' : 'UserLite' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.userEntityService.packMany(users, me, { detail: ps.detail });
|
return await this.userEntityService.packMany(users, me, { schema: ps.detail ? 'UserDetailed' : 'UserLite' });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,7 +117,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.userEntityService.packMany(_users, me, {
|
return await this.userEntityService.packMany(_users, me, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Lookup user
|
// Lookup user
|
||||||
|
@ -147,7 +147,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
}
|
}
|
||||||
|
|
||||||
return await this.userEntityService.pack(user, me, {
|
return await this.userEntityService.pack(user, me, {
|
||||||
detail: true,
|
schema: 'UserDetailed',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -14,10 +14,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
<Transition
|
<Transition
|
||||||
:enterActiveClass="defaultStore.state.animation ? $style['folder-toggle-enter-active'] : ''"
|
:enterActiveClass="defaultStore.state.animation ? $style.folderToggleEnterActive : ''"
|
||||||
:leaveActiveClass="defaultStore.state.animation ? $style['folder-toggle-leave-active'] : ''"
|
:leaveActiveClass="defaultStore.state.animation ? $style.folderToggleLeaveActive : ''"
|
||||||
:enterFromClass="defaultStore.state.animation ? $style['folder-toggle-enter-from'] : ''"
|
:enterFromClass="defaultStore.state.animation ? $style.folderToggleEnterFrom : ''"
|
||||||
:leaveToClass="defaultStore.state.animation ? $style['folder-toggle-leave-to'] : ''"
|
:leaveToClass="defaultStore.state.animation ? $style.folderToggleLeaveTo : ''"
|
||||||
@enter="enter"
|
@enter="enter"
|
||||||
@afterEnter="afterEnter"
|
@afterEnter="afterEnter"
|
||||||
@leave="leave"
|
@leave="leave"
|
||||||
|
@ -100,12 +100,12 @@ onMounted(() => {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.folder-toggle-enter-active, .folder-toggle-leave-active {
|
.folderToggleEnterActive, .folderToggleLeaveActive {
|
||||||
overflow-y: clip;
|
overflow-y: clip;
|
||||||
transition: opacity 0.5s, height 0.5s !important;
|
transition: opacity 0.5s, height 0.5s !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder-toggle-enter-from, .folder-toggle-leave-to {
|
.folderToggleEnterFrom, .folderToggleLeaveTo {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2283,7 +2283,7 @@ type ModerationLog = {
|
||||||
id: ID;
|
id: ID;
|
||||||
createdAt: DateString;
|
createdAt: DateString;
|
||||||
userId: User['id'];
|
userId: User['id'];
|
||||||
user: UserDetailed | null;
|
user: UserDetailedNotMe | null;
|
||||||
} & ({
|
} & ({
|
||||||
type: 'updateServerSettings';
|
type: 'updateServerSettings';
|
||||||
info: ModerationLogPayloads['updateServerSettings'];
|
info: ModerationLogPayloads['updateServerSettings'];
|
||||||
|
|
|
@ -3814,7 +3814,7 @@ export type components = {
|
||||||
UserDetailedNotMe: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'];
|
UserDetailedNotMe: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'];
|
||||||
MeDetailed: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'] & components['schemas']['MeDetailedOnly'];
|
MeDetailed: components['schemas']['UserLite'] & components['schemas']['UserDetailedNotMeOnly'] & components['schemas']['MeDetailedOnly'];
|
||||||
UserDetailed: components['schemas']['UserDetailedNotMe'] | components['schemas']['MeDetailed'];
|
UserDetailed: components['schemas']['UserDetailedNotMe'] | components['schemas']['MeDetailed'];
|
||||||
User: components['schemas']['UserLite'] | components['schemas']['UserDetailed'] | components['schemas']['UserDetailedNotMe'] | components['schemas']['MeDetailed'];
|
User: components['schemas']['UserLite'] | components['schemas']['UserDetailed'];
|
||||||
UserList: {
|
UserList: {
|
||||||
/**
|
/**
|
||||||
* Format: id
|
* Format: id
|
||||||
|
@ -4235,8 +4235,8 @@ export type components = {
|
||||||
followeeId: string;
|
followeeId: string;
|
||||||
/** Format: id */
|
/** Format: id */
|
||||||
followerId: string;
|
followerId: string;
|
||||||
followee?: components['schemas']['UserDetailed'];
|
followee?: components['schemas']['UserDetailedNotMe'];
|
||||||
follower?: components['schemas']['UserDetailed'];
|
follower?: components['schemas']['UserDetailedNotMe'];
|
||||||
};
|
};
|
||||||
FollowRequest: {
|
FollowRequest: {
|
||||||
/**
|
/**
|
||||||
|
@ -4259,7 +4259,7 @@ export type components = {
|
||||||
expiresAt: string | null;
|
expiresAt: string | null;
|
||||||
/** Format: id */
|
/** Format: id */
|
||||||
muteeId: string;
|
muteeId: string;
|
||||||
mutee: components['schemas']['UserDetailed'];
|
mutee: components['schemas']['UserDetailedNotMe'];
|
||||||
};
|
};
|
||||||
RenoteMuting: {
|
RenoteMuting: {
|
||||||
/**
|
/**
|
||||||
|
@ -4271,7 +4271,7 @@ export type components = {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** Format: id */
|
/** Format: id */
|
||||||
muteeId: string;
|
muteeId: string;
|
||||||
mutee: components['schemas']['UserDetailed'];
|
mutee: components['schemas']['UserDetailedNotMe'];
|
||||||
};
|
};
|
||||||
Blocking: {
|
Blocking: {
|
||||||
/**
|
/**
|
||||||
|
@ -4283,7 +4283,7 @@ export type components = {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** Format: id */
|
/** Format: id */
|
||||||
blockeeId: string;
|
blockeeId: string;
|
||||||
blockee: components['schemas']['UserDetailed'];
|
blockee: components['schemas']['UserDetailedNotMe'];
|
||||||
};
|
};
|
||||||
Hashtag: {
|
Hashtag: {
|
||||||
/** @example misskey */
|
/** @example misskey */
|
||||||
|
@ -4980,9 +4980,9 @@ export type operations = {
|
||||||
targetUserId: string;
|
targetUserId: string;
|
||||||
/** Format: id */
|
/** Format: id */
|
||||||
assigneeId: string | null;
|
assigneeId: string | null;
|
||||||
reporter: components['schemas']['User'];
|
reporter: components['schemas']['UserDetailed'];
|
||||||
targetUser: components['schemas']['User'];
|
targetUser: components['schemas']['UserDetailed'];
|
||||||
assignee?: components['schemas']['User'] | null;
|
assignee?: components['schemas']['UserDetailed'] | null;
|
||||||
category: string;
|
category: string;
|
||||||
})[];
|
})[];
|
||||||
};
|
};
|
||||||
|
@ -5038,7 +5038,7 @@ export type operations = {
|
||||||
/** @description OK (with results) */
|
/** @description OK (with results) */
|
||||||
200: {
|
200: {
|
||||||
content: {
|
content: {
|
||||||
'application/json': components['schemas']['User'];
|
'application/json': components['schemas']['MeDetailed'];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/** @description Client error */
|
/** @description Client error */
|
||||||
|
@ -5143,7 +5143,7 @@ export type operations = {
|
||||||
/** @description OK (with results) */
|
/** @description OK (with results) */
|
||||||
200: {
|
200: {
|
||||||
content: {
|
content: {
|
||||||
'application/json': components['schemas']['User'];
|
'application/json': components['schemas']['UserDetailed'];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/** @description Client error */
|
/** @description Client error */
|
||||||
|
@ -10433,7 +10433,7 @@ export type operations = {
|
||||||
content: {
|
content: {
|
||||||
'application/json': {
|
'application/json': {
|
||||||
accessToken: string;
|
accessToken: string;
|
||||||
user: components['schemas']['UserDetailedNotMe'];
|
user: components['schemas']['UserDetailed'];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -18764,7 +18764,7 @@ export type operations = {
|
||||||
/** @description OK (with results) */
|
/** @description OK (with results) */
|
||||||
200: {
|
200: {
|
||||||
content: {
|
content: {
|
||||||
'application/json': components['schemas']['UserDetailed'];
|
'application/json': components['schemas']['MeDetailed'];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
/** @description Client error */
|
/** @description Client error */
|
||||||
|
@ -23426,7 +23426,7 @@ export type operations = {
|
||||||
'application/json': {
|
'application/json': {
|
||||||
/** Format: misskey:id */
|
/** Format: misskey:id */
|
||||||
id: string;
|
id: string;
|
||||||
user: components['schemas']['User'];
|
user: components['schemas']['UserDetailed'];
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -25221,7 +25221,7 @@ export type operations = {
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
/** Format: misskey:id */
|
/** Format: misskey:id */
|
||||||
userId: string;
|
userId: string;
|
||||||
user: components['schemas']['User'];
|
user: components['schemas']['UserLite'];
|
||||||
withReplies: boolean;
|
withReplies: boolean;
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { ModerationLogPayloads } from './consts.js';
|
import { ModerationLogPayloads } from './consts.js';
|
||||||
import { Announcement, EmojiDetailed, MeDetailed, Page, User, UserDetailed } from './autogen/models.js';
|
import { Announcement, EmojiDetailed, MeDetailed, Page, User, UserDetailedNotMe } from './autogen/models.js';
|
||||||
|
|
||||||
export * from './autogen/entities.js';
|
export * from './autogen/entities.js';
|
||||||
export * from './autogen/models.js';
|
export * from './autogen/models.js';
|
||||||
|
@ -19,7 +19,7 @@ export type ModerationLog = {
|
||||||
id: ID;
|
id: ID;
|
||||||
createdAt: DateString;
|
createdAt: DateString;
|
||||||
userId: User['id'];
|
userId: User['id'];
|
||||||
user: UserDetailed | null;
|
user: UserDetailedNotMe | null;
|
||||||
} & ({
|
} & ({
|
||||||
type: 'updateServerSettings';
|
type: 'updateServerSettings';
|
||||||
info: ModerationLogPayloads['updateServerSettings'];
|
info: ModerationLogPayloads['updateServerSettings'];
|
||||||
|
|
Loading…
Reference in a new issue