import { Chat } from '../chat' ; import { ChatContent } from '.' ; /**
 * Append text
 */ export class TextContent implements ChatContent { constructor ( public text ) { } append ( chat ) { chat . text += this . text ; } } /**
 * Append attachment
 */ export class AttachmentContent implements ChatContent { constructor ( public attachment ) { } append ( chat ) { if ( ! chat . attachment ) return ; chat . attachment = Object . assign ( chat . attachment , this . attachment ) ; } }