grammyjs/conversations

feat: run middleware from within a conversation

KnorpelSenf opened this issue · 1 comments

It would be great to be able to run middleware from within a conversation.

function convo(conversation: MyConversation, ctx: MyContext) {
  await conversation.run(middleware())
}

This would run the middleware once, as soon as it is reached, regardless of whether we are inside a replay operation or not. As a result, we should be able to install grammY plugins specifically for one conversation.

This might very well combine with #42.

Please review #47 and in turn #52.