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