summaryrefslogtreecommitdiff
path: root/src/remote
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-19 09:17:42 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-19 09:17:42 +0900
commit02fd46f64f6fb18e812acda523224011b405d546 (patch)
treeae343838210626b569176a2b9290b0ade3a88d92 /src/remote
parentUpdate index.ts (diff)
downloadmisskey-02fd46f64f6fb18e812acda523224011b405d546.tar.gz
misskey-02fd46f64f6fb18e812acda523224011b405d546.tar.bz2
misskey-02fd46f64f6fb18e812acda523224011b405d546.zip
Fix bug
Diffstat (limited to 'src/remote')
-rw-r--r--src/remote/activitypub/models/note.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts
index c947243664..94d723e239 100644
--- a/src/remote/activitypub/models/note.ts
+++ b/src/remote/activitypub/models/note.ts
@@ -47,7 +47,8 @@ export async function createNote(value: any, resolver?: Resolver, silent = false
const object = await resolver.resolve(value) as any;
if (object == null || object.type !== 'Note') {
- throw new Error('invalid note');
+ log(`invalid note: ${object}`);
+ return null;
}
const note: INoteActivityStreamsObject = object;
@@ -62,7 +63,7 @@ export async function createNote(value: any, resolver?: Resolver, silent = false
if (!note.to.includes('https://www.w3.org/ns/activitystreams#Public')) visibility = 'unlisted';
if (note.cc.length == 0) visibility = 'private';
// TODO
- if (visibility != 'public') throw new Error('unspported visibility');
+ if (visibility != 'public') return null;
//#endergion
// 添付メディア