UNPKG

cloudhub-playback-sdk

Version:

CloudHubPlaybackSDK

24 lines (23 loc) 846 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const Action_1 = __importDefault(require("./Action")); const Logger_1 = __importDefault(require("../Logger")); const global_1 = __importDefault(require("../global")); class SendChatMsgAction extends Action_1.default { constructor(jsonString, room) { super(jsonString, room); this.eventType = global_1.default.eventType.chatMsg; Logger_1.default.info(`SendChatMsgAction`, this); } toEventObject() { return { fromId: this.data.fromID || '', textMsg: this.data.msg, extraData: this.data.extraData }; } } exports.default = SendChatMsgAction;