Skip to content

local chat history #21

@mxcop

Description

@mxcop

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
  └─ ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions