You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
279 B
12 lines
279 B
const { compose, getText, extractCommandText } = require('../util/index.js');
|
|
|
|
const sessionFinder = sessions => ctx => command => {
|
|
const identifier = compose(
|
|
extractCommandText(command),
|
|
getText,
|
|
)(ctx);
|
|
|
|
return sessions[identifier];
|
|
};
|
|
|
|
module.exports = sessionFinder;
|