diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-03 08:24:48 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-03 08:24:48 +0900 |
| commit | 2a9cba25a89b5cf2394a22696ee0fb67140076a9 (patch) | |
| tree | 449eedac92632e4d9eed507b6186762e1f7b6e48 /src/api/models | |
| parent | wip (diff) | |
| download | sharkey-2a9cba25a89b5cf2394a22696ee0fb67140076a9.tar.gz sharkey-2a9cba25a89b5cf2394a22696ee0fb67140076a9.tar.bz2 sharkey-2a9cba25a89b5cf2394a22696ee0fb67140076a9.zip | |
wip
Diffstat (limited to 'src/api/models')
| -rw-r--r-- | src/api/models/messaging-message.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/api/models/messaging-message.ts b/src/api/models/messaging-message.ts index cad6823cb8..50955d7fb0 100644 --- a/src/api/models/messaging-message.ts +++ b/src/api/models/messaging-message.ts @@ -1,3 +1,8 @@ import db from '../../db/mongodb'; export default db.get('messaging_messages') as any; // fuck type definition + +export function isValidText(text: string): boolean { + return text.length <= 1000 && text.trim() != ''; +} + |