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

Support for .ready verification event (MSC2366) & other things #1140

Merged
merged 44 commits into from
Jan 20, 2020

Commits on Jan 3, 2020

  1. Configuration menu
    Copy the full SHA
    882d3a7 View commit details
    Browse the repository at this point in the history
  2. return request instead of verifier from verification methods

    as MSC2366 adds an extra interactive step to the verification process,
    we can't wait for the verifier after sending the request.
    
    This is a breaking change in the js-sdk as it changes the return type
    of an existing method.
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    2da7253 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    10e2947 View commit details
    Browse the repository at this point in the history
  4. expose common phases as properties

    so we don't need to import the PHASE_ constants where we need to check
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    28e46a8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4c6dd56 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cd7cc1b View commit details
    Browse the repository at this point in the history
  7. WIP

    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    b34a2c7 View commit details
    Browse the repository at this point in the history
  8. store in-room verification requests by roomId, txnId

    as it's harder to determine the other side of a request, given
    the in-room code also processes remote echos for own events.
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    c4142d9 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5f9e822 View commit details
    Browse the repository at this point in the history
  10. make this a public prop

    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    dac4a54 View commit details
    Browse the repository at this point in the history
  11. don't block remote echos to VerificationRequests

    also put logic to block non-participating senders in VerificationRequest
    so it is shared between both channels.
    
    Remote echo's should not be passed to the verifier though.
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    984b623 View commit details
    Browse the repository at this point in the history
  12. only move to PHASE_DONE when both .done events are received

    as once in done, the request is removed from the request map
    and the second .done event that comes in will not find the request
    anymore, so the request wouldn't be attached to the event anymore,
    breaking rendering it in the timeline.
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    29c04b6 View commit details
    Browse the repository at this point in the history
  13. get other user id from channel

    next up is inspecting the .request event to
    determine it reliably in InRoomChannel
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    efe2488 View commit details
    Browse the repository at this point in the history
  14. get other party user id by inspecting initial event sender/to fields

    also fail validation with any event not sent by or directed to us
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    48977e6 View commit details
    Browse the repository at this point in the history
  15. move blocking non-participating users back to InRoomChannel

    as it doesn't need to happen for ToDeviceChannel
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    883b83f View commit details
    Browse the repository at this point in the history
  16. attempt at only creating verifier for live events

    but doesn't work yet? data where liveEvent is fished out is undefined
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    e7bcb61 View commit details
    Browse the repository at this point in the history
  17. WIP historical

    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    cf42ad8 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    0d3d27a View commit details
    Browse the repository at this point in the history
  19. don't mark events loaded from cache as live events

    this makes the verifier want to interact with the other party
    when just reloading the session.
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    57135a8 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    8ed51c8 View commit details
    Browse the repository at this point in the history
  21. fixes & implement timeout

    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    3ec8233 View commit details
    Browse the repository at this point in the history
  22. use isRemoteEcho to determine if the event is theirs or not

    rather than the sender and from_device (which is not always set)
    
    as this was one of the things breaking to_device verification
    of ones own devices.
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    423c8a8 View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    3a9dc37 View commit details
    Browse the repository at this point in the history
  24. allow to move straight from UNSENT to STARTED

    this was one of the things breaking to_device verification
    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    213bb9d View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    5919874 View commit details
    Browse the repository at this point in the history
  26. fix method names

    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    75fc25f View commit details
    Browse the repository at this point in the history
  27. commit logging

    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    9338d9c View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    f44e0a8 View commit details
    Browse the repository at this point in the history
  29. add note to fix bug later

    bwindels committed Jan 3, 2020
    Configuration menu
    Copy the full SHA
    72fd1e4 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2020

  1. Configuration menu
    Copy the full SHA
    1205178 View commit details
    Browse the repository at this point in the history

Commits on Jan 17, 2020

  1. fix lint

    bwindels committed Jan 17, 2020
    Configuration menu
    Copy the full SHA
    07cc93c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    59bfc45 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cbe2965 View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2020

  1. to make this work while using fake timers, don't use setTimeout

    but instead use Promise.resolved() as then always runs in the next tick.
    bwindels committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    e51ba79 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c34ccc9 View commit details
    Browse the repository at this point in the history
  3. enable fake timers for consistency

    although it doesn't make or break the test
    bwindels committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    e895283 View commit details
    Browse the repository at this point in the history
  4. fixup: another timeout

    bwindels committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    77d0a76 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c12a3b6 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    121e9d0 View commit details
    Browse the repository at this point in the history
  7. set transaction_id for remote echos in TestClient

    as InRoomChannel looks at this to decide whether an event is
    a remote echo (and to pass it to the verifier or not)
    bwindels committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    e5c65d5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bd9a2c1 View commit details
    Browse the repository at this point in the history
  9. remove obsolete comment

    bwindels committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    aac6829 View commit details
    Browse the repository at this point in the history
  10. update jsdoc of requestVerificationDM

    which now returns a Promise of VerificationRequest instead of verifier
    bwindels committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    d526229 View commit details
    Browse the repository at this point in the history
  11. remove obsolete and now broken method

    a request should be accepted by calling accept() on the request.
    bwindels committed Jan 20, 2020
    Configuration menu
    Copy the full SHA
    9d6f873 View commit details
    Browse the repository at this point in the history