Skip to content

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

@EiffelFly

Description

@EiffelFly

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions