Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

### Node JS Bot Framework for Cisco Webex

> ⚠️ **Maintenance status:** This repository is maintained on a best-effort basis for security fixes, dependency and runtime updates, and low-risk compatibility work. Pull requests are still considered, but new feature development is not planned.

This project is inspired by, and provides an alternate implementation of, the awesome [node-flint](https://github.com/flint-bot/flint/) framework by [Nick Marus](https://github.com/nmarus). The framework makes it easy to quickly develop a Webex messaging bot, abstracting away some of the complexity of Webex For Developers interfaces, such as registering for events and calling REST APIs. A bot developer can use the framework to focus primarily on how the bot will interact with users in Webex, by writing "handlers" for various message or membership events in spaces where the bot has been added.

The primary change in this implementation is that it is based on the [webex-jssdk](https://webex.github.io/webex-js-sdk) which continues to be supported as new features and functionality are added to Webex.
Expand Down
2 changes: 1 addition & 1 deletion lib/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var validator = require('../lib/validator');
var sequence = require('when/sequence');
var moment = require('moment');
var HttpsProxyAgent = require('https-proxy-agent');
var Webex = require('webex');
var Webex = require('webex-node');
var _debug = require('debug')('framework');
var util = require('util');
var when = require('when');
Expand Down
6 changes: 3 additions & 3 deletions lib/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ Validator.isToken = (token) => {
if (!token) {
return when.reject(new Error('invalid token'));
}
const Webex = require('webex'); // eslint-disable-line global-require
const webex = new Webex({ token });
const Webex = require('webex-node'); // eslint-disable-line global-require
const webex = Webex.init({ credentials: { access_token: token }});

return webex.personMe()
return webex.people.get('me')
.then((person) => {
if (Validator.isPerson(person)) {
return when(token);
Expand Down
Loading