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

Use a more structured algorithm for determining decryption client for appservice events #352

Open
wants to merge 103 commits into
base: main
Choose a base branch
from

Commits on Dec 9, 2022

  1. Update ownership metadata

    AndrewFerr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    f10d39f View commit details
    Browse the repository at this point in the history
  2. Query & claim needed keys before encrypting (turt2live#270)

    Ensure that the bot has all keys needed for sharing a room key with
    recipients before encryping an event in that room.
    
    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    5d62511 View commit details
    Browse the repository at this point in the history
  3. Handle pre-shared invite keys (turt2live#271)

    * Handle pre-shared invite keys
    
    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    
    * Use assignment for changes to membership array
    
    * Catch member lookup errors in prepareEncrypt
    
    Treat an error in looking up room members of a particular membership
    type as there being no members of that type.
    
    Return early if no members are found.
    
    * Resolve conflict on `members` variable
    
    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Dec 9, 2022
    Configuration menu
    Copy the full SHA
    6e9c700 View commit details
    Browse the repository at this point in the history

Commits on Dec 19, 2022

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

Commits on Jan 18, 2023

  1. Allow zero values for LRU config options

    We'd like to disable the LRU to tempoarily workaround some caching issues, which requires us to be able to set the values of maxAgeMs/maxCached to `0`.
    Half-Shot committed Jan 18, 2023
    Configuration menu
    Copy the full SHA
    b505f75 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2023

  1. Allow zero values for LRU config options (turt2live#6)

    We'd like to disable the LRU to tempoarily workaround some caching
    issues, which requires us to be able to set the values of
    maxAgeMs/maxCached to `0`.
    Half-Shot committed Jan 19, 2023
    Configuration menu
    Copy the full SHA
    68c4733 View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2023

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

Commits on Mar 27, 2023

  1. Update main branch to current v0.6.5 pre-release state (turt2live#7)

    Includes v0.6.4+patches (not yet released as v0.6.5 upstream)
    turt2live committed Mar 27, 2023
    Configuration menu
    Copy the full SHA
    cbcc8ef View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2023

  1. v0.6.4-element.0

    Half-Shot committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    3900fe2 View commit details
    Browse the repository at this point in the history
  2. Use the new members array?

    turt2live committed Mar 28, 2023
    Configuration menu
    Copy the full SHA
    9c2036c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2485ea1 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2023

  1. Fix key query and claim APIs to support async functionality (turt2liv…

    …e#314)
    
    * Fix key query and claim APIs to support async functionality
    
    * fix copy/paste fail
    turt2live committed Apr 5, 2023
    Configuration menu
    Copy the full SHA
    b19bd4c View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2023

  1. Better interface

    turt2live committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    33c7242 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    db33128 View commit details
    Browse the repository at this point in the history
  3. 0.6.5

    Half-Shot committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    aa7394c View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2023

  1. Allow usage of the SQLite-based crypto store

    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    3bd23c4 View commit details
    Browse the repository at this point in the history
  2. Add types for lowdb

    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    c73cacf View commit details
    Browse the repository at this point in the history
  3. Update tests

    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    bce5d60 View commit details
    Browse the repository at this point in the history
  4. Update examples

    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    00a0b27 View commit details
    Browse the repository at this point in the history
  5. Fix lint rules for new the imports in examples

    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Apr 17, 2023
    Configuration menu
    Copy the full SHA
    dc8202a View commit details
    Browse the repository at this point in the history

Commits on Apr 20, 2023

  1. Test the SQLite crypto store

    Run all tests with both the Sled and SQLite store types
    
    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    4c07639 View commit details
    Browse the repository at this point in the history
  2. Fix lint rules

    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    3f24fb5 View commit details
    Browse the repository at this point in the history
  3. Add missing semicolon

    Signed-off-by: Andrew Ferrazzutti <[email protected]>
    AndrewFerr committed Apr 20, 2023
    Configuration menu
    Copy the full SHA
    a983376 View commit details
    Browse the repository at this point in the history

Commits on Apr 21, 2023

  1. Configuration menu
    Copy the full SHA
    50460ae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d4c8886 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2023

  1. Configuration menu
    Copy the full SHA
    5b75a2f View commit details
    Browse the repository at this point in the history
  2. Update deps

    AndrewFerr committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    82c0f14 View commit details
    Browse the repository at this point in the history
  3. Update eslint

    AndrewFerr committed Apr 25, 2023
    Configuration menu
    Copy the full SHA
    18875a2 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2023

  1. Remove superfluous comment

    AndrewFerr committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    563d129 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f527b7 View commit details
    Browse the repository at this point in the history
  3. Update Jest

    This fixes incompatibility issues with ts-jest and Typescript 5.0.4.
    AndrewFerr committed Apr 26, 2023
    Configuration menu
    Copy the full SHA
    795323d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    11f3962 View commit details
    Browse the repository at this point in the history

Commits on May 18, 2023

  1. Sync with upstream

    AndrewFerr committed May 18, 2023
    Configuration menu
    Copy the full SHA
    f62a508 View commit details
    Browse the repository at this point in the history

Commits on Jun 5, 2023

  1. Configuration menu
    Copy the full SHA
    888c97d View commit details
    Browse the repository at this point in the history
  2. Reduce our reliance on an up-to-date joined rooms cache (turt2live#16)

    * Reduce our reliance on an up-to-date joined rooms cache
    
    * Remove joined room caching entirely
    
    * Remove now-unused variables
    
    * Undo accidental API breakage in getJoinedRooms()
    
    * Deprecate ensureJoined()
    
    ---------
    
    Co-authored-by: Tadeusz Sośnierz <[email protected]>
    tadzik and tadzik committed Jun 5, 2023
    Configuration menu
    Copy the full SHA
    9df413e View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2023

  1. Update src/MatrixClient.ts

    Co-authored-by: Andrew Ferrazzutti <[email protected]>
    Half-Shot and AndrewFerr committed Jun 29, 2023
    Configuration menu
    Copy the full SHA
    7902671 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5617a1f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fbec61f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6b37f16 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    813cc80 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f985cd4 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. Fix races

    Half-Shot committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    a0c209e View commit details
    Browse the repository at this point in the history
  2. Refactor transaction handler. (turt2live#20)

    Fixes turt2live#327
    
    This:
    - Moves the actual transaction handling logic to it's own function.
    - Uses a `Map` to store the txnId => `Promise` .
    - Always clears up transactions after they've run.
    Half-Shot committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    cfae65f View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2023

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

Commits on Aug 1, 2023

  1. Remove Sled crypto store, use SQLite by default

    on account of it being removed from the crypto-sdk
    AndrewFerr committed Aug 1, 2023
    Configuration menu
    Copy the full SHA
    8c7c2ae View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8e306a8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6eb9572 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2023

  1. Update rust-sdk bindings

    AndrewFerr committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    73a38c1 View commit details
    Browse the repository at this point in the history
  2. Pull to-device event list out of returned tuple

    OlmMachine.receiveSyncChanges returns an array of [device messages,
    room key changes], so emit "to_device.decrypted" with that instead of
    the entire array.
    
    Fixes regression introduced by turt2live#287.
    AndrewFerr committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    fef0d54 View commit details
    Browse the repository at this point in the history
  3. Log when OlmMachine returns unexpected value

    Also condense the validity checks on the returned value
    AndrewFerr committed Aug 2, 2023
    Configuration menu
    Copy the full SHA
    974771b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d87f7d8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ceae460 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bfe6c37 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    64463f4 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2023

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

Commits on Aug 4, 2023

  1. Fix/document awaits

    AndrewFerr committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    7449440 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cc221fb View commit details
    Browse the repository at this point in the history
  3. Put auth_data signature in correct place

    Also add/tweak some utility types to help with this
    AndrewFerr committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    ae61b8f View commit details
    Browse the repository at this point in the history
  4. Add key backup test

    AndrewFerr committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    bcee62b View commit details
    Browse the repository at this point in the history
  5. Satisfy linter

    AndrewFerr committed Aug 4, 2023
    Configuration menu
    Copy the full SHA
    1af9ee9 View commit details
    Browse the repository at this point in the history

Commits on Aug 10, 2023

  1. Add tests and fixes

    AndrewFerr committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    f96ac19 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    746e4a7 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'af/no-sled'

    AndrewFerr committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    a1d7a72 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d6a8ff6 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9a3dfae View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2023

  1. Configuration menu
    Copy the full SHA
    c249cf5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    401ad7a View commit details
    Browse the repository at this point in the history
  3. Get type checking from OlmMachine.shareRoomKey

    Update the rust-sdk bindings to have access to type checking in the
    return value of OlmMachine.shareRoomKey, which now returns an array of
    ToDeviceRequest objects instead of a JSON encoding of the whole array.
    AndrewFerr committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    ac1fe44 View commit details
    Browse the repository at this point in the history
  4. Merge branch 'main'

    AndrewFerr committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    b3475a1 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2e00af9 View commit details
    Browse the repository at this point in the history

Commits on Sep 4, 2023

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

Commits on Sep 6, 2023

  1. Update dependency

    Half-Shot committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    187363e View commit details
    Browse the repository at this point in the history
  2. Nitpick: fix inconsistent indent in package.json

    so that "yarn add" won't have to change the indentation again
    AndrewFerr committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    3988fd3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7fdb6e2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b945461 View commit details
    Browse the repository at this point in the history
  5. Catch when CryptoClient can't find room members

    CryptoClient#onRoomEvent may throw when looking up the members of a room
    with a client that isn't in the room, which can happen if appservice
    namespaces are broad & the appservice receives events for rooms that
    some of its managed clients are not members of.
    AndrewFerr committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    4b59dc0 View commit details
    Browse the repository at this point in the history
  6. Put exportRoomKeysForSession on MatrixClient

    This also allows it to be guarded with a check on whether the client's
    crypto had been set up.
    AndrewFerr committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    b5fbd7f View commit details
    Browse the repository at this point in the history
  7. Test room key exports

    AndrewFerr committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    bd9fa96 View commit details
    Browse the repository at this point in the history
  8. Emit an event when an Intent is created

    This allows responding to when a transaction requires an appservice user
    that the process has not yet initialized.
    AndrewFerr committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    ee77957 View commit details
    Browse the repository at this point in the history
  9. Warn instead of error

    because:
    - the failure will print its own logs
    - the point of catching this is that it's _not_ an error
    AndrewFerr committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    dab204a View commit details
    Browse the repository at this point in the history
  10. Don't print error object in warning

    because the failure already logs the error
    AndrewFerr committed Sep 6, 2023
    Configuration menu
    Copy the full SHA
    8fbe5e0 View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2023

  1. Prevent setting multiple room key backup listeners

    If key backups are enabled on a client that already has them enabled,
    don't re-add the listener for to-device room key messages.
    AndrewFerr committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    8dab018 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    356954e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e57073c View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2023

  1. Emit "intent.new" after caching the new Intent

    Otherwise, if a listener of that event were to trigger a lookup of the
    same Intent, the lookup wouldn't see the event in the Intent cache, and
    thus cause a new Intent to be created & new event to be emitted.
    AndrewFerr committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    f03e778 View commit details
    Browse the repository at this point in the history
  2. Add test

    AndrewFerr committed Sep 27, 2023
    Configuration menu
    Copy the full SHA
    a5dcf62 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0c074f2 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2023

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

Commits on Nov 17, 2023

  1. Merge upstream release

    AndrewFerr committed Nov 17, 2023
    Configuration menu
    Copy the full SHA
    ea8c166 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2023

  1. Configuration menu
    Copy the full SHA
    686a499 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9c6835e View commit details
    Browse the repository at this point in the history
  3. v1

    Half-Shot committed Nov 22, 2023
    Configuration menu
    Copy the full SHA
    06e66df View commit details
    Browse the repository at this point in the history

Commits on Nov 24, 2023

  1. Fix test

    Half-Shot authored and AndrewFerr committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    cf05059 View commit details
    Browse the repository at this point in the history
  2. Fix tests

    Half-Shot authored and AndrewFerr committed Nov 24, 2023
    Configuration menu
    Copy the full SHA
    703e625 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    669408d View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2023

  1. Configuration menu
    Copy the full SHA
    e84fee9 View commit details
    Browse the repository at this point in the history
  2. Use ES2022 for Error causes

    Half-Shot committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    42fc7e8 View commit details
    Browse the repository at this point in the history
  3. Fix release version

    Half-Shot committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    ed4ba92 View commit details
    Browse the repository at this point in the history
  4. And examples too

    Half-Shot committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    15643f8 View commit details
    Browse the repository at this point in the history
  5. Fix obvious bs

    Half-Shot committed Nov 29, 2023
    Configuration menu
    Copy the full SHA
    81e6824 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2023

  1. Configuration menu
    Copy the full SHA
    5a0dd1e View commit details
    Browse the repository at this point in the history
  2. Tidy up

    Half-Shot committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    c852f25 View commit details
    Browse the repository at this point in the history
  3. Lint

    Half-Shot committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    9344147 View commit details
    Browse the repository at this point in the history