Skip to content

Commit

Permalink
ダイレクト投稿でユーザーが指定されていなかったらrejectする (#3724)
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 authored and syuilo committed Dec 22, 2018
1 parent c9c2853 commit 98acf91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/services/note/create.ts
Expand Up @@ -188,6 +188,11 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
data.visibleUsers.push(u);
}
}

// ダイレクト投稿でユーザーが指定されていなかったらreject
if (data.visibleUsers.length === 0) {
return rej('Target user is not specified');
}
}

const note = await insertNote(user, data, tags, emojis, mentionedUsers);
Expand Down

0 comments on commit 98acf91

Please sign in to comment.