16 lines
721 B
TypeScript
16 lines
721 B
TypeScript
import * as moment from 'moment';
|
|
import ClientController from '../client-controller.js';
|
|
import { Message } from '../data-types';
|
|
import Q from '../q-module.js';
|
|
|
|
import ElementsUtil from './require/elements-util.js';
|
|
|
|
export default function createTextMessageContinued(q: Q, server: ClientController, message: Message): HTMLElement {
|
|
return q.create({ class: 'message continued', 'meta-id': message.id, 'meta-member-id': message.member.id, 'meta-server-id': server.id, content: [
|
|
{ class: 'timestamp', content: moment(message.sent).format('HH:mm') },
|
|
{ class: 'right', content: [
|
|
{ class: 'content text', content: ElementsUtil.parseMessageText(message.text ?? '') }
|
|
] }
|
|
] }) as HTMLElement;
|
|
}
|