diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-30 11:24:07 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-30 11:24:07 +0900 |
| commit | 75c4c844e6d679cd94da59525801fdd879e780c1 (patch) | |
| tree | afbba7da50f7af3106e3e8d15e53ced1f726c041 /src/models | |
| parent | Update user.ts (diff) | |
| download | misskey-75c4c844e6d679cd94da59525801fdd879e780c1.tar.gz misskey-75c4c844e6d679cd94da59525801fdd879e780c1.tar.bz2 misskey-75c4c844e6d679cd94da59525801fdd879e780c1.zip | |
cw
Diffstat (limited to 'src/models')
| -rw-r--r-- | src/models/post.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/models/post.ts b/src/models/post.ts index 833e599320..9bc0c1d3b9 100644 --- a/src/models/post.ts +++ b/src/models/post.ts @@ -18,6 +18,10 @@ export function isValidText(text: string): boolean { return text.length <= 1000 && text.trim() != ''; } +export function isValidCw(text: string): boolean { + return text.length <= 100 && text.trim() != ''; +} + export type IPost = { _id: mongo.ObjectID; channelId: mongo.ObjectID; @@ -27,6 +31,7 @@ export type IPost = { repostId: mongo.ObjectID; poll: any; // todo text: string; + cw: string; userId: mongo.ObjectID; appId: mongo.ObjectID; viaMobile: boolean; |