vani-meeting-client
Version:
Vani Meeting Clinet SDK
32 lines (31 loc) • 1.24 kB
JavaScript
export var ChatMessageType;
(function (ChatMessageType) {
ChatMessageType["Chat"] = "chat";
ChatMessageType["File"] = "file";
ChatMessageType["Info"] = "info";
})(ChatMessageType || (ChatMessageType = {}));
export var ChatSendVia;
(function (ChatSendVia) {
ChatSendVia["WebSocket"] = "WebSocket";
ChatSendVia["DataChannel"] = "DataChannel";
})(ChatSendVia || (ChatSendVia = {}));
var MessagePayload = /** @class */ (function () {
function MessagePayload(_message, _to, _sender, _type) {
if (_to === void 0) { _to = "all"; }
if (_type === void 0) { _type = ChatMessageType.Chat; }
this.to = "all";
this.extraData = {};
this.shouldPresist = false;
this.time = new Date().getTime();
this.chatSendVia = ChatSendVia.WebSocket;
this.message = _message;
this.to = _to;
this.sender = _sender;
this.type = _type;
}
MessagePayload.prototype.toJsonObjectForSending = function () {
return { message: this.message, to: this.to, extraData: this.extraData, type: this.type, sender: this.senderUserId, shouldPresist: this.shouldPresist, time: this.time };
};
return MessagePayload;
}());
export { MessagePayload };