-
Notifications
You must be signed in to change notification settings - Fork 219
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
feat: split message to have dedicated to and from fields #6358
feat: split message to have dedicated to and from fields #6358
Conversation
Test Results (CI) 3 files 120 suites 56m 20s ⏱️ Results for commit 64cbdc9. ♻️ This comment has been updated with latest results. |
Test Results (Integration tests) 2 files 11 suites 40m 24s ⏱️ For more details on these failures, see this check. Results for commit 64cbdc9. ♻️ This comment has been updated with latest results. |
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.
It mostly looks good but I think some of the interface change goes in the wrong direction. It follows the pattern of providing readers for things, but then fails in practical usage.
base_layer/contacts/src/contacts_service/storage/types/messages.rs
Outdated
Show resolved
Hide resolved
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.
LGTM
make dual addresses fmt build
03f5e90
to
ca420a8
Compare
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.
Looks good, just some comments about the naming convention.
base_layer/contacts/migrations/2024-05-27-145200_add_from_to_fields/up.sql
Outdated
Show resolved
Hide resolved
pub to_address: Vec<u8>, | ||
pub from_address: Vec<u8>, |
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.
ditto receiver
& sender
pub to_address: Vec<u8>, | ||
pub from_address: Vec<u8>, |
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.
ditto receiver
& sender
let to_address = | ||
TariAddress::from_bytes(&o.to_address).map_err(|_| ContactsServiceStorageError::ConversionError)?; | ||
let from_address = | ||
TariAddress::from_bytes(&o.from_address).map_err(|_| ContactsServiceStorageError::ConversionError)?; |
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.
ditto receiver
& sender
to_address: o.to_address.to_bytes().to_vec(), | ||
from_address: o.from_address.to_bytes().to_vec(), |
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.
ditto receiver
& sender
Description
split message to have dedicated to and from fields
Motivation and Context
This is needed for #6353
When a chat client receives a message, it needs to know the complete address of the receiver, not just a part of it. This allows the user to get the complete address by saving what the sender said their address is