Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Send device list updates to application services (MSC3202) - part 1 #11881

Merged
merged 27 commits into from
Mar 30, 2022

Commits on Mar 9, 2022

  1. Set min application service stream_id to 1

    Factored out into #12193.
    anoadragon453 committed Mar 9, 2022
    Configuration menu
    Copy the full SHA
    4b67118 View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2022

  1. Configuration menu
    Copy the full SHA
    51be04b View commit details
    Browse the repository at this point in the history
  2. Add to_key arg, user_ids optional for get_users_whose_devices_changed

    to_key prevents overlapping bounds when pulling out device list updates.
    
    user_ids needs to be optional as we won't have a list of user_ids to
    filter with when calling this function from a triggered device_list
    change.
    anoadragon453 committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    b4aad36 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1671f87 View commit details
    Browse the repository at this point in the history
  4. Move DeviceLists type to synapse.types

    So that we can use it elsewhere.
    anoadragon453 committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    a77f351 View commit details
    Browse the repository at this point in the history
  5. Switch DeviceLists to containing Sets, which allows item deletes

    In the next commit, we'll be merging one DeviceList into another. This
    will require the ability to remove items by value, which Collection does
    not provide, while a mutable structure such as Set does. Set was chosen to
    to remove duplicate user IDs.
    anoadragon453 committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    88c4e73 View commit details
    Browse the repository at this point in the history
  6. Use get_users_whose_devices_changed to pull device list changes for g…

    …iven AS
    
    When a new device list change occurs, we're now:
    
    1. For each appservice, checking the last device list stream key that was
       processed up until.
    2. Getting any users with changed device list between the last device list
       stream key and the stream key of the triggering update.
    3. Filtering out those users based on those that are actually relevant
       to this application service.
    4. Passing those changes to enqueue_for_appservice and saving the device list
       stream key that we've just processed up to for later reference.
    anoadragon453 committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    047db4d View commit details
    Browse the repository at this point in the history
  7. Add device lists to AS txns, thread thru the AS scheduler methods

    Here we implement code that adds support for device list changes all
    the way from our enqueue_for_appservice method down to where AS
    transactions are actually built and sent out.
    anoadragon453 committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    55ac419 View commit details
    Browse the repository at this point in the history
  8. Fix existing tests for device list changes

    Mainly just adding device list parameters to every method call.
    anoadragon453 committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    3d2f018 View commit details
    Browse the repository at this point in the history
  9. Add tests

    We add a series of tests that check whether device list sending works
    across a variety of possible configurations.
    anoadragon453 committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    4168d2f View commit details
    Browse the repository at this point in the history
  10. changelog

    anoadragon453 committed Mar 10, 2022
    Configuration menu
    Copy the full SHA
    9d903aa View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    9b0572d View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2022

  1. Apply suggestions from code review

    Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
    anoadragon453 and clokep committed Mar 23, 2022
    Configuration menu
    Copy the full SHA
    84ea3e2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    55eb056 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8ef2df8 View commit details
    Browse the repository at this point in the history

Commits on Mar 28, 2022

  1. Configuration menu
    Copy the full SHA
    d08e52c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5f7cd20 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7bd8118 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7e4a531 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2022

  1. Update synapse/appservice/scheduler.py

    Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
    anoadragon453 and clokep committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    fca1add View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d00c2b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9f5eb99 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    afb9cfc View commit details
    Browse the repository at this point in the history
  5. Use difference_update instead of -=

    This makes mypy happy!
    anoadragon453 committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    9ed4403 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    dff0a91 View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2022

  1. Configuration menu
    Copy the full SHA
    e4f94ff View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    73817f3 View commit details
    Browse the repository at this point in the history