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

Commit

Permalink
Merge tag 'v1.40.0rc2' into develop
Browse files Browse the repository at this point in the history
Synapse 1.40.0rc2 (2021-08-04)
==============================

Bugfixes
--------

- Fix the `PeriodicallyFlushingMemoryHandler` inhibiting application shutdown because of its background thread. ([\#10517](#10517))
- Fix a bug introduced in Synapse v1.40.0rc1 that could cause Synapse to respond with an error when clients would update read receipts. ([\#10531](#10531))

Internal Changes
----------------

- Fix release script to open the correct URL for the release. ([\#10516](#10516))
  • Loading branch information
erikjohnston committed Aug 5, 2021
2 parents 9db24cc + 05111f8 commit a36d77c
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 3 deletions.
16 changes: 16 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
Synapse 1.40.0rc2 (2021-08-04)
==============================

Bugfixes
--------

- Fix the `PeriodicallyFlushingMemoryHandler` inhibiting application shutdown because of its background thread. ([\#10517](https://github.com/matrix-org/synapse/issues/10517))
- Fix a bug introduced in Synapse v1.40.0rc1 that could cause Synapse to respond with an error when clients would update read receipts. ([\#10531](https://github.com/matrix-org/synapse/issues/10531))


Internal Changes
----------------

- Fix release script to open the correct URL for the release. ([\#10516](https://github.com/matrix-org/synapse/issues/10516))


Synapse 1.40.0rc1 (2021-08-03)
==============================

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
matrix-synapse-py3 (1.40.0~rc2) stable; urgency=medium

* New synapse release 1.40.0~rc2.

-- Synapse Packaging team <[email protected]> Wed, 04 Aug 2021 17:08:55 +0100

matrix-synapse-py3 (1.40.0~rc1) stable; urgency=medium

[ Richard van der Hoff ]
Expand Down
2 changes: 1 addition & 1 deletion scripts-dev/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ def tag(gh_token: Optional[str]):
)

# Open the release and the actions where we are building the assets.
click.launch(release.url)
click.launch(release.html_url)
click.launch(
f"https://github.com/matrix-org/synapse/actions?query=branch%3A{tag_name}"
)
Expand Down
2 changes: 1 addition & 1 deletion synapse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
except ImportError:
pass

__version__ = "1.40.0rc1"
__version__ = "1.40.0rc2"

if bool(os.environ.get("SYNAPSE_TEST_PATCH_LOG_CONTEXTS", False)):
# We import here so that we don't have to install a bunch of deps when
Expand Down
1 change: 1 addition & 0 deletions synapse/logging/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def __init__(
self._flushing_thread: Thread = Thread(
name="PeriodicallyFlushingMemoryHandler flushing thread",
target=self._flush_periodically,
daemon=True,
)
self._flushing_thread.start()

Expand Down
2 changes: 1 addition & 1 deletion synapse/rest/client/v2_alpha/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async def on_POST(self, request, room_id, receipt_type, event_id):
if receipt_type != "m.read":
raise SynapseError(400, "Receipt type must be 'm.read'")

body = parse_json_object_from_request(request)
body = parse_json_object_from_request(request, allow_empty_body=True)
hidden = body.get(ReadReceiptEventFields.MSC2285_HIDDEN, False)

if not isinstance(hidden, bool):
Expand Down
12 changes: 12 additions & 0 deletions tests/rest/client/v2_alpha/test_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,18 @@ def test_hidden_read_receipts(self):
# Test that the first user can't see the other user's hidden read receipt
self.assertEqual(self._get_read_receipt(), None)

def test_read_receipt_with_empty_body(self):
# Send a message as the first user
res = self.helper.send(self.room_id, body="hello", tok=self.tok)

# Send a read receipt for this message with an empty body
channel = self.make_request(
"POST",
"/rooms/%s/receipt/m.read/%s" % (self.room_id, res["event_id"]),
access_token=self.tok2,
)
self.assertEqual(channel.code, 200)

def _get_read_receipt(self):
"""Syncs and returns the read receipt."""

Expand Down

0 comments on commit a36d77c

Please sign in to comment.