Commit cbdd5cf3 authored by nanahira's avatar nanahira

dispatch only on valid selector

parent 433442c8
......@@ -95,6 +95,11 @@ export default class ApiBot extends Bot {
username: body.username || userId,
},
});
if (!this.ctx.filter(session)) {
ctx.status = 200;
ctx.body = { messages: [] };
return;
}
const currentPromise = this.ctx.app.parallel('message', session);
session.currentPromise = currentPromise;
ctx.status = 200;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment