ringcentral-personal-chatbot
Version:
RingCentral personal chatbot framework
20 lines (15 loc) • 529 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = buildOffMessage;
var _constants = require("./constants");
async function buildOffMessage(user) {
let warn = '';
if (user && !user.enabled) {
const url = await (0, _constants.buildLoginUrlRedirect)();
warn = user.turnOffDesc === 'self' ? 'You have disabled auto reply.' : 'Renew token failure caused auto reply turned off.';
warn = `\n${warn} You can [click to enable auto reply](${url})\n`;
}
return warn;
}