Skip to content

Conversation

@LWJerri
Copy link
Contributor

@LWJerri LWJerri commented Nov 10, 2025

Closes #4

Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to avoid structuredClone?

@KnorpelSenf KnorpelSenf changed the title chore: Do not share data between memory sessions chore: do not share data between memory sessions Nov 10, 2025
@LWJerri LWJerri marked this pull request as draft November 11, 2025 00:14
@LWJerri LWJerri marked this pull request as ready for review January 23, 2026 10:06
@LWJerri LWJerri requested a review from KnorpelSenf January 23, 2026 10:06
@LWJerri LWJerri changed the title chore: do not share data between memory sessions chore: Do not share data between memory sessions Jan 23, 2026
@KnorpelSenf KnorpelSenf reopened this Jan 23, 2026
@KnorpelSenf
Copy link
Member

oops

Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's certainly an interesting decision to clone all values passed to the storage adapter, too. #4 only mentions memory sessions because they live in RAM and traditionally share data between requests. Usually, I'd expect persistent storage adapters to serialise the data anyway, making your cloning redundant.

What was the reason for this decision?

@KnorpelSenf KnorpelSenf changed the title chore: Do not share data between memory sessions chore: do not share data between memory sessions Jan 23, 2026
@LWJerri LWJerri requested a review from KnorpelSenf January 23, 2026 10:33
Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KnorpelSenf KnorpelSenf merged commit faf95f2 into grammyjs:main Jan 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: do not share data between memory sessions

2 participants