vn-verdnaturachat/app/lib/methods/helpers/buildMessage.ts

9 lines
357 B
TypeScript

import { IMessage, IThreadResult } from '../../../definitions';
import messagesStatus from '../../../constants/messagesStatus';
import normalizeMessage from './normalizeMessage';
export default (message: Partial<IMessage> | IThreadResult): Partial<IMessage> | IThreadResult => {
message.status = messagesStatus.SENT;
return normalizeMessage(message);
};