2.0.1 • Published 3 years ago

daab-session v2.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

daab-session

This library adds support for a conversation session to daab.

Installation

npm install daab-session

Usage

You can use this library as follows:

const { withSession } = require('daab-session');

const actions = robot => {
  robot.respond(/ping$/i, res => {
    let session = res.session; // current session object. it has 'id' and 'data' fields.
    ...
  });
};

module.exports = withSession(actions);

The default store is MemoryStore. There is RedisStore as another store implementation.

More information about usage can be found in the examples directory.

2.0.1

3 years ago

2.0.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.3.0

4 years ago