models/communities/ChatMessageContent.js

import MediaAttachment from './../MediaAttachment.js';

export default class ChatMessageContent {
    /**
     * Creates a ChatMessageContent.
     *
     * @constructor ChatMessageContent
     * @param {Object} contentMap - Content parameters
     * @param {string} [contentMap.text] - Text
     * @param {MediaAttachment[]} [contentMap.attachments=[]] - Attachments
     * @param {Object<string, string>} [contentMap.properties={}] - Properties
     */
    constructor(contentMap) {
        this.text = contentMap.text || null;
        this.attachments = contentMap.attachments || [];
        this.properties = contentMap.properties || {};
    }
}