Skip to content

Conversation

@andrej-zirko
Copy link

DIDComm rust implementation does not include the id of the attachment, when forwarding the message.

On other hand didcomm-jvm validates whether the attachment contains the id and fails.

This makes these two libraries incompatible.

Attachment ID is optional, but recommended.

serde_json::from_str(forwarded_msg)
.kind(ErrorKind::Malformed, "Unable deserialize forwarded message")?,
)
.id(generate_attachment_id())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use the function above generate_message_id, maybe we could rename it? I do not like having two functions which have exactly the same body.

Copy link
Contributor

@dkulic dkulic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Avoid having two functions with exactly the same code.
generate_attachment_id and generate_message_id

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

Successfully merging this pull request may close these issues.

3 participants