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

Forward message is missing attachment id #102

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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.

@@ -147,6 +151,7 @@ fn build_forward_message(
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