1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 22:38:30 +09:00

WIP: Support sharedInbox

This commit is contained in:
syuilo 2018-07-19 22:40:44 +09:00
parent 534c47935a
commit bfa326af2c
3 changed files with 5 additions and 0 deletions

View File

@ -108,6 +108,7 @@ export interface ILocalUser extends IUserBase {
export interface IRemoteUser extends IUserBase {
inbox: string;
sharedInbox?: string;
endpoints: string[];
uri: string;
url?: string;

View File

@ -117,6 +117,7 @@ export async function createPerson(value: any, resolver?: Resolver): Promise<IUs
publicKeyPem: person.publicKey.publicKeyPem
},
inbox: person.inbox,
sharedInbox: person.sharedInbox,
endpoints: person.endpoints,
uri: person.id,
url: person.url,
@ -239,6 +240,8 @@ export async function updatePerson(value: string | IObject, resolver?: Resolver)
await User.update({ _id: exist._id }, {
$set: {
updatedAt: new Date(),
inbox: person.inbox,
sharedInbox: person.sharedInbox,
avatarId: avatar ? avatar._id : null,
bannerId: banner ? banner._id : null,
avatarUrl: avatar && avatar.metadata.isMetaOnly ? avatar.metadata.url : null,

View File

@ -47,6 +47,7 @@ export interface IPerson extends IObject {
preferredUsername: string;
manuallyApprovesFollowers: boolean;
inbox: string;
sharedInbox?: string;
publicKey: any;
followers: any;
following: any;