-
Notifications
You must be signed in to change notification settings - Fork 3
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
max 900 bytes #21
base: main
Are you sure you want to change the base?
max 900 bytes #21
Conversation
@@ -32,7 +32,8 @@ const LINK_TAG_ARROW_REVERSE: [u8; 3] = [226, 134, 169]; // Unicode "↩" // hex | |||
#[hdk_entry(id = "extra", visibility = "public")] | |||
#[derive(Clone)] | |||
pub struct Extra { | |||
pub fields: BTreeMap<String, String>, // extra content | |||
pub content_overflow: Option<String>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pub content_overflow: Option<String>, | |
pub full_content: Option<String>, |
@@ -32,7 +32,8 @@ const LINK_TAG_ARROW_REVERSE: [u8; 3] = [226, 134, 169]; // Unicode "↩" // hex | |||
#[hdk_entry(id = "extra", visibility = "public")] | |||
#[derive(Clone)] | |||
pub struct Extra { | |||
pub fields: BTreeMap<String, String>, // extra content | |||
pub content_overflow: Option<String>, | |||
pub extra_fields: Option<BTreeMap<String, String>>, // extra content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would just be empty if nothing in there:
pub extra_fields: Option<BTreeMap<String, String>>, // extra content | |
pub extra_fields: BTreeMap<String, String>, // extra content |
@@ -413,7 +413,8 @@ pub async fn test_get_extra() { | |||
.await; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's have a test that pushes in 1000 bytes of content, and:
- ensure that we get an extra hash in the link tag
- retrieve the content from the extra entry and validate that it is correct
@dauphin3 made some comments |
- Modify `Extra` struct to include `content_overflow` and optional `extra_fields` - Update `create` function to handle content overflow - Refactor `create_extra` to accommodate new `Extra` structure - Adjust `create_link_tag` to truncate long content and handle new chunk structure - Update query functions to use new link tag format - Modify tests to reflect changes in `Extra` struct Co-authored-by: Zeek <[email protected]>
Co-authored-by: Zeek <[email protected]>
d50eb15
to
f7944e6
Compare
fixes #7