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

Feat: store conversation in database instead of in-memory map object #12

Open
purerosefallen opened this issue Dec 7, 2022 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@purerosefallen
Copy link
Member

To make conversations survive between Koishi restarts, it could be better to store the conversation IDs into database instead of a memory map.

@MaikoTan MaikoTan added enhancement New feature or request help wanted Extra attention is needed labels Dec 7, 2022
@MaikoTan
Copy link
Member

MaikoTan commented Dec 7, 2022

Maybe we should also consider instances that has no database enabled, how to deal with them?

Can you provide some minimal example or workaround?

@purerosefallen
Copy link
Member Author

purerosefallen commented Dec 7, 2022

You may use .userFields to observe user, and do the talk. if user does not exist, fallback to the map thing.
Plus, if you think instances without database should be considered, so do other plugins such as github, or teach.

@purerosefallen
Copy link
Member Author

Now that Cache API being a thing, how about that one?

@MaikoTan
Copy link
Member

MaikoTan commented Feb 4, 2023

I'll take a look when I have time.

Merci pour votre information !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants