-
Notifications
You must be signed in to change notification settings - Fork 248
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
fix(bridge)_: fix bridge replies not working when they come from Discord #5830
Conversation
Jenkins BuildsClick to see older builds (20)
|
1c5288b
to
d93e6a9
Compare
d93e6a9
to
2552a78
Compare
@jrainville a bunch of tests are failing, including I think it's only |
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.
Nice and clean, just fix the TestBridgeMessageReplies
2552a78
to
ba8236f
Compare
@igor-sirotin @osmaczko re-asking review because I removed even more code when I fixed the test. I also tested again with the real app to make sure my assumptions were all right and it still all works. Proof: Also, I tested closing the app and sending a lot of messages and replies, so that it would fetch out of order to confirm that it still managed to populate the replies even out of order and it worked: For example, the |
ba8236f
to
c9023c0
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## develop #5830 +/- ##
===========================================
+ Coverage 45.60% 46.02% +0.42%
===========================================
Files 884 884
Lines 157168 157126 -42
===========================================
+ Hits 71674 72325 +651
+ Misses 77245 76503 -742
- Partials 8249 8298 +49
Flags with carried forward coverage won't be shown. Click here to find out more.
|
protocol/persistence_test.go
Outdated
@@ -1995,18 +1995,18 @@ func TestBridgeMessageReplies(t *testing.T) { | |||
err = insertMinimalBridgeMessage(p, "444", "4", "3") | |||
require.NoError(t, err) | |||
|
|||
// status message "222" should have reply_to = "111" | |||
// status message "222" should have reply_to =" 1" because it's a discord message to another discord message |
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.
These message ids are so unobvious, impossible to read the test really 😵💫
Fixes status-im/status-desktop#16323 The problem was that the code expected to receive the Discord message ID, but the bridge is smart enough to return the Status message ID already, so there is no need to try and convert it. There were also a couple issues in the bridge code itself.
c9023c0
to
860e758
Compare
Fixes status-im/status-desktop#16323
The problem was that the code expected to receive the Discord message ID, but the bridge is smart enough to return the Status message ID already, so there is no need to try and convert it.
There were also a couple issues in the bridge code itself.
Bridge PR: status-im/matterbridge#18