Skip to content

Multi Sessions and Conversations #345

@receter

Description

@receter

I don’t manage to get conversations to work with multi sessions. It does work with normal configuration (not session type "multi") but if I try to change it to multi it stops working.

  bot.use(session({
    type: "multi",
    user: {
      storage: new MemorySessionStorage(),
      initial: createInitialSessionDataUser,
      getSessionKey: (ctx) => ctx.from?.id.toString()
    }
  }));

  bot.use(conversations());
  bot.use(createConversation(conversationA));

This works though:

  bot.use(session({
    initial() {
      // return empty object for now
      return {};
    },
  }));

  bot.use(conversations());
  bot.use(createConversation(conversationA));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions