Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning to conversations migration instructions #1188

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions site/docs/plugins/conversations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1463,6 +1463,7 @@ Thus, all conversations will be restarted.
There is no way to keep the current state of conversations when upgrading from 1.x to 2.x.

You should just drop the respective data from your sessions.
You can do that by deleting the `conversation` property from your session data.
Consider using [session migrations](./session#migrations) for this.

Persisting conversations data with version 2.x can be done as described [here](#persisting-conversations).
Expand Down Expand Up @@ -1497,6 +1498,12 @@ await conversation.external((ctx) => { // [!code ++]
> Accessing `ctx.session` was possible with 1.x, but it was always incorrect.
> `ctx.session` is no longer available with 2.x.

::: warning Sending Data Back to the Outside Context

Because the session plugin is only registered to the outside context, you will need to assign session data to `ctx.session` yourself.
Simply writing to the `session` variable from the example above will not work.

:::
### Plugin Compatibility Changes Between 1.x and 2.x

Conversations 1.x were barely compatible with any plugins.
Expand Down
Loading