Fix bug
This commit is contained in:
parent
dfb6e717e4
commit
02fd46f64f
3 changed files with 6 additions and 7 deletions
|
|
@ -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
|
||||
|
||||
// 添付メディア
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue