mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-13 13:37:31 -07:00
@contextをちゃんと付ける (#7522)
This commit is contained in:
parent
15198a15d7
commit
07fca58301
1 changed files with 27 additions and 30 deletions
|
@ -15,17 +15,8 @@ export const renderActivity = (x: any): IActivity | null => {
|
|||
return Object.assign({
|
||||
'@context': [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
]
|
||||
}, x);
|
||||
};
|
||||
|
||||
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);
|
||||
|
||||
const obj = {
|
||||
'https://w3id.org/security/v1',
|
||||
{
|
||||
// as non-standards
|
||||
manuallyApprovesFollowers: 'as:manuallyApprovesFollowers',
|
||||
sensitive: 'as:sensitive',
|
||||
|
@ -50,9 +41,15 @@ export const attachLdSignature = async (activity: any, user: { id: User['id']; h
|
|||
'isCat': 'misskey:isCat',
|
||||
// vcard
|
||||
vcard: 'http://www.w3.org/2006/vcard/ns#',
|
||||
}
|
||||
]
|
||||
}, x);
|
||||
};
|
||||
|
||||
activity['@context'].push(obj);
|
||||
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);
|
||||
|
||||
const ldSignature = new LdSignature();
|
||||
ldSignature.debug = false;
|
||||
|
|
Loading…
Reference in a new issue