-
Notifications
You must be signed in to change notification settings - Fork 9
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(decrypted_notify): update message payload and pass raw message #281
feat(decrypted_notify): update message payload and pass raw message #281
Conversation
fa9b0b9
to
8269b2c
Compare
1742104
to
4a6f0c3
Compare
8269b2c
to
ed6a83e
Compare
bca5560
to
3a9a2a0
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.
LGTM, but please do not merge until https://github.com/WalletConnect/rs-relay/pull/1285 is merged so we can ensure there are no backwards incompatibilities.
3a9a2a0
to
28f331e
Compare
@@ -175,18 +178,52 @@ pub async fn handler_internal( | |||
) | |||
})?; | |||
|
|||
let cloned_body = body.clone(); | |||
let push_message = if client.always_raw { |
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.
Probably this condition or our spec description should be changed because in our spec we require the tag to be presented as well if always_raw == false
to filter by tag and send clear text notification for some of the tags. I think we should fix this in a spec and do tag filtering when the always_raw == true
. cc @chris13524
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.
When set to
false
, cleartext notifications will be sent for certain messages based ontag
This filtering is performed in the relay, and was already implemented. So I don't think anything needs to be done here.
Cargo.toml
Outdated
@@ -66,7 +66,7 @@ fcm = "0.9" | |||
ed25519-dalek = "2.0.0-rc.2" | |||
|
|||
# JWT Authentication | |||
relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", rev = "ced99e7"} | |||
relay_rpc = { git = "https://github.com/WalletConnect/WalletConnectRust.git", rev = "4ee9007"} |
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.
Must we use hashes on repos we control?
It would be much better to make a release and use the tag in our dependencies.
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.
I switched it 👍
c22be2a
to
d79dbf3
Compare
Description
This PR adds
topic
,tag
andmessage
fields for the send notification request payload to follow the specs for the decrypted notifications.The handler modification checks if the client was registered (have)
always_raw
astrue
and then handles the message as an encrypted with the payload from themessage
field. Otherwise, handle the payload as usual to support backward compatibility.Related to #278
How Has This Been Tested?
always_raw = true
and push message with the new required fields are tested by the new test_push_always_raw test.Review stack 🏗️
1 - Adding always_raw for the client registration #279
2 - Update message payload and pass raw message #281 <-
Due Diligence