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

local chat history #21

Open
4 tasks
mxcop opened this issue Oct 10, 2022 · 0 comments
Open
4 tasks

local chat history #21

mxcop opened this issue Oct 10, 2022 · 0 comments
Labels
feature New feature or request

Comments

@mxcop
Copy link
Member

mxcop commented Oct 10, 2022

Create a system that will allow us to save chat history to the Emberry data directory.

Backend

  • Construct a file path using the data directory & room key
  • Write the message history to multiple file chunks *
  • Write all content (e.g. images, files, etc) to a content directory within the same path
  • Simple reader for history that can be called from the frontend

File Chunks *

We should store the chat messages into multiple files,
To avoid loading too much data when a chat is opened.
We can then dynamically load more history as we need it.
(The maximum file size of a chunk hasn't been decided yet)

File Structure

~/AppData/Roaming/Emberry/History/<room_id>/*
  ├─ cdn/*      - # Content delivery network (where all content are stored)
  │  ├─ <image>.png
  │  └─ ...
  ├─ 0.data     - # History chunks will be named using numbers
  └─ ...
@mxcop mxcop changed the title Chat History store chat history Apr 24, 2023
@mxcop mxcop changed the title store chat history local chat history Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants