forked from FoundKeyGang/FoundKey
fix some audience parsing assumptions
The assumptions made in the comment is actually wrong. The comment says: "If value is a string, this means it must have passed through the resolver, which means it must be public." But this is not true because we do signed GET requests which means we may well get non-public posts using the resolver.
This commit is contained in:
parent
bda8488194
commit
2696c34f6c
1 changed files with 2 additions and 4 deletions
|
@ -101,10 +101,8 @@ export async function createNote(value: string | IObject, resolver: Resolver, si
|
|||
|
||||
// If audience(to,cc) was not specified
|
||||
if (visibility === 'specified' && visibleUsers.length === 0) {
|
||||
if (typeof value === 'string') { // 入力がstringならばresolverでGETが発生している
|
||||
// こちらから匿名GET出来たものならばpublic
|
||||
visibility = 'public';
|
||||
}
|
||||
// TODO derive audience from context (e.g. whose inbox this was in?)
|
||||
throw new Error('audience not understood');
|
||||
}
|
||||
|
||||
let isTalk = note._misskey_talk && visibility === 'specified';
|
||||
|
|
Loading…
Reference in a new issue