1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-01 23:55:58 +09:00

fix: when text is null, bug can pass validation.

fixed. (maybe?)
This commit is contained in:
momf 2018-06-08 22:00:18 +09:00 committed by GitHub
parent cc6fa135ac
commit 02e6b732e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -140,7 +140,7 @@ module.exports = (params, user: ILocalUser, app: IApp) => new Promise(async (res
} }
// テキストが無いかつ添付ファイルが無いかつRenoteも無いかつ投票も無かったらエラー // テキストが無いかつ添付ファイルが無いかつRenoteも無いかつ投票も無かったらエラー
if (text === undefined && files === null && renote === null && poll === undefined) { if ((text === undefined or text === null) && files === null && renote === null && poll === undefined) {
return rej('text, mediaIds, renoteId or poll is required'); return rej('text, mediaIds, renoteId or poll is required');
} }