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

build(deps-dev): bump matrix-synapse from 1.33.0 to 1.45.1 in /requirements #7436

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
33 changes: 19 additions & 14 deletions raiden/network/transport/matrix/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,20 +542,23 @@ def _sync(self, timeout_ms: int, latency_ms: int) -> None:
if response:
token = uuid4()

presence = response.get("presence")
to_device = response.get("to_device")
log.debug(
"Sync returned",
node=node_address_from_userid(self.user_id),
token=token,
elapsed=time_after_sync - time_before_sync,
current_user=self.user_id,
presence_events_qty=len(response["presence"]["events"]),
to_device_events_qty=len(response["to_device"]["events"]),
presence_events_qty=presence and len(presence["events"]) or 0,
to_device_events_qty=to_device and len(to_device["events"]) or 0,
)

# Updating the sync token should only be done after the response is
# saved in the queue, otherwise the data can be lost in a stop/start.
self.response_queue.put((token, response, datetime.now()))
self.sync_token = response["next_batch"]
# XXX what to do if none?
self.sync_token = response.get("next_batch")
self.sync_progress.set_synced(token)

def _handle_message(
Expand Down Expand Up @@ -624,17 +627,19 @@ def _handle_responses(self, currently_queued_responses: List[JSONResponse]) -> N
messages: List[MatrixMessage] = []

for response in currently_queued_responses:
for presence_update in response["presence"]["events"]:
for callback in list(self.presence_listeners.values()):
callback(presence_update, next(self._presence_update_ids))

for to_device_message in response["to_device"]["events"]:
for listener in self.listeners[:]:
if listener["event_type"] == "to_device":
listener["callback"](to_device_message)

# Add toDevice messages to message queue
messages.extend(response["to_device"]["events"])
if "presence" in response:
for presence_update in response["presence"]["events"]:
for callback in list(self.presence_listeners.values()):
callback(presence_update, next(self._presence_update_ids))

if "to_device" in response:
for to_device_message in response["to_device"]["events"]:
for listener in self.listeners[:]:
if listener["event_type"] == "to_device":
listener["callback"](to_device_message)

# Add toDevice messages to message queue
messages.extend(response["to_device"]["events"])

if messages:
self.handle_messages_callback(messages)
Expand Down
6 changes: 5 additions & 1 deletion requirements/requirements-ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ idna==2.8
# requests
# twisted
# yarl
ijson==3.1.4
# via
# -r requirements-dev.txt
# matrix-synapse
importlib-metadata==4.8.1
# via
# -r requirements-dev.txt
Expand Down Expand Up @@ -383,7 +387,7 @@ matplotlib-inline==0.1.2
# ipython
matrix-client==0.3.2
# via -r requirements-dev.txt
matrix-synapse==1.33.0
matrix-synapse==1.41.1
# via -r requirements-dev.txt
mccabe==0.6.1
# via
Expand Down
4 changes: 3 additions & 1 deletion requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ idna==2.8
# requests
# twisted
# yarl
ijson==3.1.4
# via matrix-synapse
importlib-metadata==4.8.1
# via pluggy
incremental==17.5.0
Expand Down Expand Up @@ -341,7 +343,7 @@ matplotlib-inline==0.1.2
# via ipython
matrix-client==0.3.2
# via -r requirements.txt
matrix-synapse==1.33.0
matrix-synapse==1.41.1
# via -r requirements-dev.in
mccabe==0.6.1
# via
Expand Down