models/communities/ActivityContent.js

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

export default class ActivityContent {
    /**
     * Creates an ActivityContent
     *
     * @constructor ActivityContent
     * @param {Object} params - Content params.
     * @param {string} [params.text] - Text
     * @param {MediaAttachment[]} [params.attachments=[]] - Attachments.
     * @param {ActivityButton} [params.button] - Button.
     * @param {Object<string, string>} [params.properties={}] - Properties.
     * @param {PollContent} [params.poll] - Poll content.
     * @param {string[]} [params.labels] - Labels.
     */
    constructor(params) {
      this.text = params.text || null;
      this.attachments = params.attachments || [];
      this.button = params.button || null;
      this.properties = params.properties || {};
      this.poll = params.poll || null;
      this.labels = params.labels || null;
    }
}