2017-06-12 12:12:30 -05:00
|
|
|
import * as mongo from 'mongodb';
|
2017-01-16 18:12:33 -06:00
|
|
|
import db from '../../db/mongodb';
|
|
|
|
|
2017-01-18 01:30:42 -06:00
|
|
|
export default db.get('messaging_messages') as any; // fuck type definition
|
2017-03-02 17:24:48 -06:00
|
|
|
|
2017-06-12 12:12:30 -05:00
|
|
|
export interface IMessagingMessage {
|
|
|
|
_id: mongo.ObjectID;
|
|
|
|
}
|
|
|
|
|
2017-03-02 17:24:48 -06:00
|
|
|
export function isValidText(text: string): boolean {
|
|
|
|
return text.length <= 1000 && text.trim() != '';
|
|
|
|
}
|