diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-08 06:55:26 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-08 06:55:26 +0900 |
| commit | 6e34e77372bd74c85ebf5a6b4214c818231dbe8b (patch) | |
| tree | 614e46573693bb4e0b6d097fde88a52d1cd0fa1f /src/remote/activitypub/resolver.ts | |
| parent | Fix bug (diff) | |
| download | misskey-6e34e77372bd74c85ebf5a6b4214c818231dbe8b.tar.gz misskey-6e34e77372bd74c85ebf5a6b4214c818231dbe8b.tar.bz2 misskey-6e34e77372bd74c85ebf5a6b4214c818231dbe8b.zip | |
Implement announce
And bug fixes
Diffstat (limited to 'src/remote/activitypub/resolver.ts')
| -rw-r--r-- | src/remote/activitypub/resolver.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/remote/activitypub/resolver.ts b/src/remote/activitypub/resolver.ts index 4a97e2ef66..1466139c48 100644 --- a/src/remote/activitypub/resolver.ts +++ b/src/remote/activitypub/resolver.ts @@ -1,6 +1,7 @@ import * as request from 'request-promise-native'; import * as debug from 'debug'; import { IObject } from './type'; +//import config from '../../config'; const log = debug('misskey:activitypub:resolver'); @@ -47,6 +48,11 @@ export default class Resolver { this.history.add(value); + //#region resolve local objects + // TODO + //if (value.startsWith(`${config.url}/@`)) { + //#endregion + const object = await request({ url: value, headers: { @@ -60,6 +66,7 @@ export default class Resolver { !object['@context'].includes('https://www.w3.org/ns/activitystreams') : object['@context'] !== 'https://www.w3.org/ns/activitystreams' )) { + log(`invalid response: ${JSON.stringify(object, null, 2)}`); throw new Error('invalid response'); } |