* wip

* wip

* wip

* wip

* wip

* Update define.ts

* Update update.ts

* Update user.ts

* wip

* wip

* Update request.ts

* URL

* wip

* wip

* wip

* wip

* Update invite.ts

* Update create.ts
This commit is contained in:
syuilo 2021-03-24 11:05:37 +09:00 committed by GitHub
parent 62cc14c93b
commit ce340aba7a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 252 additions and 201 deletions

View file

@ -2,8 +2,8 @@ import config from '@/config';
import { v4 as uuid } from 'uuid';
import { IActivity } from '../type';
import { LdSignature } from '../misc/ld-signature';
import { ILocalUser } from '../../../models/entities/user';
import { getUserKeypair } from '@/misc/keypair-store';
import { User } from '@/models/entities/user';
export const renderActivity = (x: any): IActivity | null => {
if (x == null) return null;
@ -20,7 +20,7 @@ export const renderActivity = (x: any): IActivity | null => {
}, x);
};
export const attachLdSignature = async (activity: any, user: ILocalUser): Promise<IActivity | null> => {
export const attachLdSignature = async (activity: any, user: { id: User['id']; host: null; }): Promise<IActivity | null> => {
if (activity == null) return null;
const keypair = await getUserKeypair(user.id);