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

Fix sending of oh_hais on bad sessions #213

Merged
merged 2 commits into from Sep 17, 2016
Merged

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Sep 17, 2016

Fix a bunch of bugs in the code which tried to send an oh_hai message when we
got a message with an unknown megolm session.

Fix a bunch of bugs in the code which tried to send an oh_hai message when we
got a message with an unknown megolm session.
Copy link
Member

@ara4n ara4n left a comment

Choose a reason for hiding this comment

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

two questions; otherwise LGTM. i'm surprised that @NegativeMjark never tested it (and irritated that I didn't review it better)

// (Alternatively, it might be that we are just looking at
// scrollback... at least we rate-limit the m.new_device events :/)
//
// XXX: this is a band-aid which masks symptoms of other bugs. It would
Copy link
Member

Choose a reason for hiding this comment

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

Is the bandaid not useful in papering over scenarios where we upgrade the protocol (e.g. the session id change from 1.2 to 1.3)?

Copy link
Member Author

Choose a reason for hiding this comment

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

uh, mayyybee? I'm afraid I'm not entirely clear on the difference between 1.2 and 1.3; and in any case I don't really think this is a good way to solve that problem.

@@ -897,34 +906,40 @@ Crypto.prototype.decryptEvent = function(event) {
* @param {string} roomId The ID of the room we want to remind them about.
*/
Crypto.prototype._sendPingToDevice = function(userId, deviceId, roomId) {
if (deviceId === undefined) {
deviceId = "*";
Copy link
Member

Choose a reason for hiding this comment

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

why have we lost this? it feels like it's needed if deviceId is optional.

Copy link
Member Author

Choose a reason for hiding this comment

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

deviceId is always included now, so it just felt like cruft to me. I suppose it might as well stay in.

@richvdh richvdh merged commit 4e0d7b5 into develop Sep 17, 2016
@richvdh richvdh deleted the rav/fix_oh_hai_ping branch October 7, 2016 14:48
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.

None yet

2 participants