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

feature: rethink how we handle JSON and markdown content #32

Open
EiffelFly opened this issue Feb 13, 2023 · 0 comments
Open

feature: rethink how we handle JSON and markdown content #32

EiffelFly opened this issue Feb 13, 2023 · 0 comments

Comments

@EiffelFly
Copy link
Owner

Currently, in our API we provide JSON object and markdown content in the DiscordThread object.

#[derive(Queryable, Serialize, Deserialize, Debug)]
pub struct DiscordThread {
    pub id: Uuid,
    pub kind: String,
    pub thread_id: String,
    #[edgedb(json)]
    pub full_messages_json: HashMap<String, String>,
    pub markdown_content: String,
    pub tags: Vec<Tag>,
    pub messages: Vec<DiscordMessage>,
    pub url: Url,
    pub created_timestamp_at_curioucity: String,
    pub created_timestamp_at_discord: String,
}

The upcoming questions are

  • When user delete discord message, how do we update the full_messages_json and markdown_content
  • We generate the markdown_content beforehand or when user query it
  • Do we need to provide these data at this moment?
EiffelFly added a commit that referenced this issue Feb 15, 2023
Implement create discord message endpoint in this PR. The left unsolved issue is #32. We need to rethink how and when we will help user to build the JSON data.
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

No branches or pull requests

1 participant