You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
708 B
JavaScript
23 lines
708 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
/**
|
|
* Rocket.Chat message class.
|
|
* Sets integration param to allow tracing source of automated sends.
|
|
* @param content Accepts message text or a preformed message object
|
|
* @todo Potential for SDK usage that isn't bots, bot prop should be optional?
|
|
*/
|
|
class Message {
|
|
constructor(content, integrationId) {
|
|
if (typeof content === 'string')
|
|
this.msg = content;
|
|
else
|
|
Object.assign(this, content);
|
|
this.bot = { i: integrationId };
|
|
}
|
|
setRoomId(roomId) {
|
|
this.rid = roomId;
|
|
return this;
|
|
}
|
|
}
|
|
exports.Message = Message;
|
|
//# sourceMappingURL=message.js.map
|