I use inline queries and noticed, session doesn't work with it.
In telegraf docs I found following information:
// Tip: To use same session in private chat with bot and in inline mode, use following session key resolver:
{
getSessionKey: (ctx) => {
if (ctx.from && ctx.chat) {
return `${ctx.from.id}:${ctx.chat.id}`
} else if (ctx.from && ctx.inlineQuery) {
return `${ctx.from.id}:${ctx.from.id}`
}
return null
}
}
Also I found a ready solution in telegraf-session-local and implemented similar solution.
I use inline queries and noticed, session doesn't work with it. In telegraf docs I found following information:
Also I found a ready solution in telegraf-session-local and implemented similar solution.