summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-10-24 17:10:50 +0100
committerOlivier Wilkinson (reivilibre) <oliverw@matrix.org>2022-10-24 17:10:50 +0100
commit42dc734f8547b95792d5789e91ee429a27ffa837 (patch)
tree7847ca2bed444f22c62822782bc088000e806a15
parentMerge remote-tracking branch 'origin/develop' into matrix-org-hotfixes (diff)
parentRevert behavior change for bundling edits of non-message events (#14283) (diff)
downloadsynapse-42dc734f8547b95792d5789e91ee429a27ffa837.tar.xz
Merge branch 'release-v1.70' into matrix-org-hotfixes
-rwxr-xr-x.ci/scripts/auditwheel_wrapper.py132
-rw-r--r--CHANGES.md96
-rw-r--r--changelog.d/10015.bugfix1
-rw-r--r--changelog.d/13394.feature1
-rw-r--r--changelog.d/13776.feature1
-rw-r--r--changelog.d/13813.bugfix1
-rw-r--r--changelog.d/13816.feature1
-rw-r--r--changelog.d/13824.feature1
-rw-r--r--changelog.d/13877.feature1
-rw-r--r--changelog.d/13878.feature1
-rw-r--r--changelog.d/13955.docker1
-rw-r--r--changelog.d/13983.misc1
-rw-r--r--changelog.d/13984.misc1
-rw-r--r--changelog.d/13985.misc1
-rw-r--r--changelog.d/13986.misc1
-rw-r--r--changelog.d/13987.misc1
-rw-r--r--changelog.d/13988.misc1
-rw-r--r--changelog.d/13991.misc1
-rw-r--r--changelog.d/13996.feature1
-rw-r--r--changelog.d/13997.feature1
-rw-r--r--changelog.d/14006.misc1
-rw-r--r--changelog.d/14007.misc1
-rw-r--r--changelog.d/14018.feature1
-rw-r--r--changelog.d/14028.feature1
-rw-r--r--changelog.d/14032.feature1
-rw-r--r--changelog.d/14033.misc1
-rw-r--r--changelog.d/14034.bugfix1
-rw-r--r--changelog.d/14040.misc1
-rw-r--r--changelog.d/14041.misc1
-rw-r--r--changelog.d/14043.misc1
-rw-r--r--changelog.d/14044.misc1
-rw-r--r--changelog.d/14046.misc1
-rw-r--r--changelog.d/14050.feature1
-rw-r--r--changelog.d/14053.bugfix1
-rw-r--r--changelog.d/14054.feature1
-rw-r--r--changelog.d/14063.misc1
-rw-r--r--changelog.d/14065.misc1
-rw-r--r--changelog.d/14072.misc1
-rw-r--r--changelog.d/14077.doc1
-rw-r--r--changelog.d/14078.doc1
-rw-r--r--changelog.d/14081.doc1
-rw-r--r--changelog.d/14083.bugfix1
-rw-r--r--changelog.d/14087.doc1
-rw-r--r--changelog.d/14089.bugfix1
-rw-r--r--changelog.d/14092.misc1
-rw-r--r--changelog.d/14093.doc1
-rw-r--r--changelog.d/14094.removal1
-rw-r--r--changelog.d/14095.misc1
-rw-r--r--changelog.d/14097.misc1
-rw-r--r--changelog.d/14102.bugfix1
-rw-r--r--changelog.d/14106.removal1
-rw-r--r--changelog.d/14107.doc1
-rw-r--r--changelog.d/14109.misc1
-rw-r--r--changelog.d/14113.misc1
-rw-r--r--changelog.d/14114.misc1
-rw-r--r--changelog.d/14115.misc1
-rw-r--r--changelog.d/14116.misc1
-rw-r--r--changelog.d/14124.doc1
-rw-r--r--changelog.d/14125.bugfix1
-rw-r--r--changelog.d/14126.misc1
-rw-r--r--changelog.d/14129.bugfix1
-rw-r--r--changelog.d/14130.misc1
-rw-r--r--changelog.d/14132.misc1
-rw-r--r--changelog.d/14134.misc1
-rw-r--r--changelog.d/14140.feature1
-rw-r--r--changelog.d/14141.docker1
-rw-r--r--changelog.d/14141.misc1
-rw-r--r--changelog.d/14142.misc1
-rw-r--r--changelog.d/14144.misc1
-rw-r--r--changelog.d/14145.doc2
-rw-r--r--changelog.d/14146.removal1
-rw-r--r--changelog.d/14148.feature1
-rw-r--r--changelog.d/14155.misc1
-rw-r--r--changelog.d/14159.feature1
-rw-r--r--changelog.d/14161.bugfix1
-rw-r--r--changelog.d/14163.feature1
-rw-r--r--changelog.d/14164.bugfix1
-rw-r--r--changelog.d/14165.docker1
-rw-r--r--changelog.d/14171.feature1
-rw-r--r--changelog.d/14174.feature1
-rw-r--r--changelog.d/14175.feature1
-rw-r--r--changelog.d/14179.feature1
-rw-r--r--changelog.d/14182.docker1
-rw-r--r--changelog.d/14184.feature1
-rw-r--r--changelog.d/14186.misc1
-rw-r--r--changelog.d/14187.misc1
-rw-r--r--changelog.d/14188.misc1
-rw-r--r--changelog.d/14189.doc1
-rw-r--r--changelog.d/14195.docker1
-rw-r--r--changelog.d/14198.misc1
-rw-r--r--changelog.d/14200.misc1
-rw-r--r--changelog.d/14201.misc1
-rw-r--r--changelog.d/14206.misc1
-rw-r--r--changelog.d/14207.misc1
-rw-r--r--changelog.d/14208.misc1
-rw-r--r--changelog.d/14212.feature1
-rw-r--r--changelog.d/14214.misc1
-rw-r--r--changelog.d/14215.bugfix1
-rw-r--r--changelog.d/14216.misc1
-rw-r--r--changelog.d/14217.misc1
-rw-r--r--changelog.d/14221.misc1
-rw-r--r--changelog.d/14222.feature1
-rw-r--r--changelog.d/14224.misc1
-rw-r--r--changelog.d/14227.misc1
-rw-r--r--changelog.d/14248.bugfix1
-rw-r--r--changelog.d/14253.misc1
-rw-r--r--changelog.d/14259.misc1
-rw-r--r--changelog.d/14280.bugfix1
-rw-r--r--changelog.d/14283.bugfix1
-rw-r--r--debian/changelog6
-rw-r--r--pyproject.toml13
-rw-r--r--synapse/federation/sender/__init__.py3
-rw-r--r--synapse/storage/databases/main/events.py61
-rw-r--r--synapse/storage/databases/main/relations.py11
-rw-r--r--tests/rest/client/test_relations.py110
115 files changed, 386 insertions, 154 deletions
diff --git a/.ci/scripts/auditwheel_wrapper.py b/.ci/scripts/auditwheel_wrapper.py
new file mode 100755
index 0000000000..a33b39314f
--- /dev/null
+++ b/.ci/scripts/auditwheel_wrapper.py
@@ -0,0 +1,132 @@
+#!/usr/bin/env python
+# Copyright 2022 The Matrix.org Foundation C.I.C.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Wraps `auditwheel repair` to first check if we're repairing a potentially abi3
+# compatible wheel, if so rename the wheel before repairing it.
+
+import argparse
+import os
+import subprocess
+from typing import Optional
+from zipfile import ZipFile
+
+from packaging.tags import Tag
+from packaging.utils import parse_wheel_filename
+from packaging.version import Version
+
+
+def check_is_abi3_compatible(wheel_file: str) -> None:
+    """Check the contents of the built wheel for any `.so` files that are *not*
+    abi3 compatible.
+    """
+
+    with ZipFile(wheel_file, "r") as wheel:
+        for file in wheel.namelist():
+            if not file.endswith(".so"):
+                continue
+
+            if not file.endswith(".abi3.so"):
+                raise Exception(f"Found non-abi3 lib: {file}")
+
+
+def cpython(wheel_file: str, name: str, version: Version, tag: Tag) -> str:
+    """Replaces the cpython wheel file with a ABI3 compatible wheel"""
+
+    if tag.abi == "abi3":
+        # Nothing to do.
+        return wheel_file
+
+    check_is_abi3_compatible(wheel_file)
+
+    abi3_tag = Tag(tag.interpreter, "abi3", tag.platform)
+
+    dirname = os.path.dirname(wheel_file)
+    new_wheel_file = os.path.join(
+        dirname,
+        f"{name}-{version}-{abi3_tag}.whl",
+    )
+
+    os.rename(wheel_file, new_wheel_file)
+
+    print("Renamed wheel to", new_wheel_file)
+
+    return new_wheel_file
+
+
+def main(wheel_file: str, dest_dir: str, archs: Optional[str]) -> None:
+    """Entry point"""
+
+    # Parse the wheel file name into its parts. Note that `parse_wheel_filename`
+    # normalizes the package name (i.e. it converts matrix_synapse ->
+    # matrix-synapse), which is not what we want.
+    _, version, build, tags = parse_wheel_filename(os.path.basename(wheel_file))
+    name = os.path.basename(wheel_file).split("-")[0]
+
+    if len(tags) != 1:
+        # We expect only a wheel file with only a single tag
+        raise Exception(f"Unexpectedly found multiple tags: {tags}")
+
+    tag = next(iter(tags))
+
+    if build:
+        # We don't use build tags in Synapse
+        raise Exception(f"Unexpected build tag: {build}")
+
+    # If the wheel is for cpython then convert it into an abi3 wheel.
+    if tag.interpreter.startswith("cp"):
+        wheel_file = cpython(wheel_file, name, version, tag)
+
+    # Finally, repair the wheel.
+    if archs is not None:
+        # If we are given archs then we are on macos and need to use
+        # `delocate-listdeps`.
+        subprocess.run(["delocate-listdeps", wheel_file], check=True)
+        subprocess.run(
+            ["delocate-wheel", "--require-archs", archs, "-w", dest_dir, wheel_file],
+            check=True,
+        )
+    else:
+        subprocess.run(["auditwheel", "repair", "-w", dest_dir, wheel_file], check=True)
+
+
+if __name__ == "__main__":
+    parser = argparse.ArgumentParser(description="Tag wheel as abi3 and repair it.")
+
+    parser.add_argument(
+        "--wheel-dir",
+        "-w",
+        metavar="WHEEL_DIR",
+        help="Directory to store delocated wheels",
+        required=True,
+    )
+
+    parser.add_argument(
+        "--require-archs",
+        metavar="archs",
+        default=None,
+    )
+
+    parser.add_argument(
+        "wheel_file",
+        metavar="WHEEL_FILE",
+    )
+
+    args = parser.parse_args()
+
+    wheel_file = args.wheel_file
+    wheel_dir = args.wheel_dir
+    archs = args.require_archs
+
+    main(wheel_file, wheel_dir, archs)
diff --git a/CHANGES.md b/CHANGES.md
index 87afa6f109..950d15b80e 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,99 @@
+Synapse 1.70.0rc1 (2022-10-19)
+==============================
+
+Features
+--------
+
+- Support for [MSC3856](https://github.com/matrix-org/matrix-spec-proposals/pull/3856): threads list API. ([\#13394](https://github.com/matrix-org/synapse/issues/13394), [\#14171](https://github.com/matrix-org/synapse/issues/14171), [\#14175](https://github.com/matrix-org/synapse/issues/14175))
+- Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)). ([\#13776](https://github.com/matrix-org/synapse/issues/13776), [\#13824](https://github.com/matrix-org/synapse/issues/13824), [\#13877](https://github.com/matrix-org/synapse/issues/13877), [\#13878](https://github.com/matrix-org/synapse/issues/13878), [\#14050](https://github.com/matrix-org/synapse/issues/14050), [\#14140](https://github.com/matrix-org/synapse/issues/14140), [\#14159](https://github.com/matrix-org/synapse/issues/14159), [\#14163](https://github.com/matrix-org/synapse/issues/14163), [\#14174](https://github.com/matrix-org/synapse/issues/14174), [\#14222](https://github.com/matrix-org/synapse/issues/14222))
+- Stop fetching missing `prev_events` after we already know their signature is invalid. ([\#13816](https://github.com/matrix-org/synapse/issues/13816))
+- Send application service access tokens as a header (and query parameter). Implements [MSC2832](https://github.com/matrix-org/matrix-spec-proposals/pull/2832). ([\#13996](https://github.com/matrix-org/synapse/issues/13996))
+- Ignore server ACL changes when generating pushes. Implements [MSC3786](https://github.com/matrix-org/matrix-spec-proposals/pull/3786). ([\#13997](https://github.com/matrix-org/synapse/issues/13997))
+- Experimental support for redirecting to an implementation of a [MSC3886](https://github.com/matrix-org/matrix-spec-proposals/pull/3886) HTTP rendezvous service. ([\#14018](https://github.com/matrix-org/synapse/issues/14018))
+- The `/relations` endpoint can now be used on workers. ([\#14028](https://github.com/matrix-org/synapse/issues/14028))
+- Advertise support for Matrix 1.3 and 1.4 on `/_matrix/client/versions`. ([\#14032](https://github.com/matrix-org/synapse/issues/14032), [\#14184](https://github.com/matrix-org/synapse/issues/14184))
+- Improve validation of request bodies for the [Device Management](https://spec.matrix.org/v1.4/client-server-api/#device-management) and [MSC2697 Device Dehyrdation](https://github.com/matrix-org/matrix-spec-proposals/pull/2697) client-server API endpoints. ([\#14054](https://github.com/matrix-org/synapse/issues/14054))
+- Experimental support for [MSC3874](https://github.com/matrix-org/matrix-spec-proposals/pull/3874). ([\#14148](https://github.com/matrix-org/synapse/issues/14148))
+- Improve the validation of the following PUT endpoints: [`/directory/room/{roomAlias}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3directoryroomroomalias), [`/directory/list/room/{roomId}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3directorylistroomroomid) and [`/directory/list/appservice/{networkId}/{roomId}`](https://spec.matrix.org/v1.4/application-service-api/#put_matrixclientv3directorylistappservicenetworkidroomid). ([\#14179](https://github.com/matrix-org/synapse/issues/14179))
+- Build and publish binary wheels for `aarch64` platforms. ([\#14212](https://github.com/matrix-org/synapse/issues/14212))
+
+
+Bugfixes
+--------
+
+- Prevent device names from appearing in device list updates in some situations when `allow_device_name_lookup_over_federation` is `false`. (This is not comprehensive: see [\#13114](https://github.com/matrix-org/synapse/issues/13114).) ([\#10015](https://github.com/matrix-org/synapse/issues/10015))
+- Fix a long-standing bug where redactions were not being sent over federation if we did not have the original event. ([\#13813](https://github.com/matrix-org/synapse/issues/13813))
+- Fix a long-standing bug where edits of non-`m.room.message` events would not be correctly bundled or have their new content applied. ([\#14034](https://github.com/matrix-org/synapse/issues/14034))
+- Fix a bug introduced in Synapse 1.53.0 when querying `/publicRooms` with both a `room_type` filter and a `third_party_instance_id`. ([\#14053](https://github.com/matrix-org/synapse/issues/14053))
+- Fix a bug introduced in Synapse 1.35.0 where errors parsing a `/send_join` or `/state` response would produce excessive, low-quality Sentry events. ([\#14065](https://github.com/matrix-org/synapse/issues/14065))
+- Fix a long-standing bug where Synapse would error on the optional 'invite_room_state' field not being provided to [`PUT /_matrix/federation/v2/invite/{roomId}/{eventId}`](https://spec.matrix.org/v1.4/server-server-api/#put_matrixfederationv2inviteroomideventid). ([\#14083](https://github.com/matrix-org/synapse/issues/14083))
+- Fix a bug where invalid oEmbed fields would cause the entire response to be discarded. Introduced in Synapse 1.18.0. ([\#14089](https://github.com/matrix-org/synapse/issues/14089))
+- Fix a bug introduced in Synapse 1.37.0 in which an incorrect key name was used for sending and receiving room metadata when knocking on a room. ([\#14102](https://github.com/matrix-org/synapse/issues/14102))
+- Fix a bug introduced in v1.69.0rc1 where the joined hosts for a given event were not being properly cached. ([\#14125](https://github.com/matrix-org/synapse/issues/14125))
+- Fix a bug introduced in Synapse 1.30.0 where purging and rejoining a room without restarting in-between would result in a broken room. ([\#14161](https://github.com/matrix-org/synapse/issues/14161), [\#14164](https://github.com/matrix-org/synapse/issues/14164))
+- Fix [MSC3030](https://github.com/matrix-org/matrix-spec-proposals/pull/3030) `/timestamp_to_event` endpoint returning potentially inaccurate closest events with `outliers` present. ([\#14215](https://github.com/matrix-org/synapse/issues/14215))
+
+
+Updates to the Docker image
+---------------------------
+
+- Update the version of frozendict in Docker images and Debian packages from 2.3.3 to 2.3.4, which may fix memory leak problems. ([\#13955](https://github.com/matrix-org/synapse/issues/13955))
+- Use the `minimal` Rust profile when building Synapse. ([\#14141](https://github.com/matrix-org/synapse/issues/14141))
+- Prevent a class of database sharding errors when using `Dockerfile-workers` to spawn multiple instances of the same worker. Contributed by Jason Little. ([\#14165](https://github.com/matrix-org/synapse/issues/14165))
+- Set `LD_PRELOAD` to use jemalloc memory allocator in Dockerfile-workers. ([\#14182](https://github.com/matrix-org/synapse/issues/14182))
+- Fix pre-startup logging being lost when using the `Dockerfile-workers` image. ([\#14195](https://github.com/matrix-org/synapse/issues/14195))
+
+
+Improved Documentation
+----------------------
+
+- Add sample worker files for `pusher` and `federation_sender`. ([\#14077](https://github.com/matrix-org/synapse/issues/14077))
+- Improve the listener example on the metrics documentation. ([\#14078](https://github.com/matrix-org/synapse/issues/14078))
+- Expand Google OpenID Connect example config to map email attribute. Contributed by @ptman. ([\#14081](https://github.com/matrix-org/synapse/issues/14081))
+- The changelog entry ending in a full stop or exclamation mark is not optional. ([\#14087](https://github.com/matrix-org/synapse/issues/14087))
+- Fix links to jemalloc documentation, which were broken in [#13491](https://github.com/matrix-org/synapse/pull/14124). ([\#14093](https://github.com/matrix-org/synapse/issues/14093))
+- Remove not needed `replication` listener in docker compose example. ([\#14107](https://github.com/matrix-org/synapse/issues/14107))
+- Fix name of `alias_creation_rules` option in the config manual documentation. ([\#14124](https://github.com/matrix-org/synapse/issues/14124))
+- Clarify comment on event contexts. ([\#14145](https://github.com/matrix-org/synapse/issues/14145))
+- Fix dead link to the [Admin Registration API](https://matrix-org.github.io/synapse/latest/admin_api/register_api.html). ([\#14189](https://github.com/matrix-org/synapse/issues/14189))
+
+
+Deprecations and Removals
+-------------------------
+
+- Remove the experimental implementation of [MSC3772](https://github.com/matrix-org/matrix-spec-proposals/pull/3772). ([\#14094](https://github.com/matrix-org/synapse/issues/14094))
+- Remove the unstable identifier for [MSC3715](https://github.com/matrix-org/matrix-doc/pull/3715). ([\#14106](https://github.com/matrix-org/synapse/issues/14106), [\#14146](https://github.com/matrix-org/synapse/issues/14146))
+
+
+Internal Changes
+----------------
+
+- Optimise queries used to get a users rooms during sync. Contributed by Nick @ Beeper (@fizzadar). ([\#13991](https://github.com/matrix-org/synapse/issues/13991))
+- Update authlib from 0.15.5 to 1.1.0. ([\#14006](https://github.com/matrix-org/synapse/issues/14006))
+- Make `parse_server_name` consistent in handling invalid server names. ([\#14007](https://github.com/matrix-org/synapse/issues/14007))
+- Don't repeatedly wake up the same users for batched events. ([\#14033](https://github.com/matrix-org/synapse/issues/14033))
+- Complement test image: capture logs from nginx. ([\#14063](https://github.com/matrix-org/synapse/issues/14063))
+- Don't create noisy Sentry events when a requester drops connection to the metrics server mid-request. ([\#14072](https://github.com/matrix-org/synapse/issues/14072))
+- Run the integration test suites with the asyncio reactor enabled in CI. ([\#14092](https://github.com/matrix-org/synapse/issues/14092))
+- Add debug logs to figure out why an event was filtered out of the client response. ([\#14095](https://github.com/matrix-org/synapse/issues/14095))
+- Indicate what endpoint came back with a JSON response we were unable to parse. ([\#14097](https://github.com/matrix-org/synapse/issues/14097))
+- Break up calls to fetch rooms for many users. Contributed by Nick @ Beeper (@fizzadar). ([\#14109](https://github.com/matrix-org/synapse/issues/14109))
+- Faster joins: prioritise the server we joined by when restarting a partial join resync. ([\#14126](https://github.com/matrix-org/synapse/issues/14126))
+- Cache Rust build cache when building docker images. ([\#14130](https://github.com/matrix-org/synapse/issues/14130))
+- Enable dependabot for Rust dependencies. ([\#14132](https://github.com/matrix-org/synapse/issues/14132))
+- Bump typing-extensions from 4.1.1 to 4.4.0. ([\#14134](https://github.com/matrix-org/synapse/issues/14134))
+- Use the `minimal` Rust profile when building Synapse. ([\#14141](https://github.com/matrix-org/synapse/issues/14141))
+- Remove unused configuration code. ([\#14142](https://github.com/matrix-org/synapse/issues/14142))
+- Prepare for the [`gotestfmt` repository move](https://github.com/GoTestTools/gotestfmt/discussions/46). ([\#14144](https://github.com/matrix-org/synapse/issues/14144))
+- Invalidate rooms for user caches on replicated event, fix sync cache race in synapse workers. Contributed by Nick @ Beeper (@fizzadar). ([\#14155](https://github.com/matrix-org/synapse/issues/14155))
+- Enable url previews when testing with complement. ([\#14198](https://github.com/matrix-org/synapse/issues/14198))
+- When authenticating batched events, check for auth events in batch as well as DB. ([\#14214](https://github.com/matrix-org/synapse/issues/14214))
+- Update CI config to avoid GitHub Actions deprecation warnings. ([\#14216](https://github.com/matrix-org/synapse/issues/14216), [\#14224](https://github.com/matrix-org/synapse/issues/14224))
+- Update dependency requirements to allow building with poetry-core 1.3.2. ([\#14217](https://github.com/matrix-org/synapse/issues/14217))
+- Rename the `cache_memory` extra to `cache-memory`, for compatability with poetry-core 1.3.0 and [PEP 685](https://peps.python.org/pep-0685/). From-source installations using this extra will need to install using the new name. ([\#14221](https://github.com/matrix-org/synapse/issues/14221))
+- Specify dev-dependencies using lower bounds, to reduce the likelihood of a dependabot merge conflict. The lockfile continues to pin to specific versions. ([\#14227](https://github.com/matrix-org/synapse/issues/14227))
+
+
 Synapse 1.69.0 (2022-10-17)
 ===========================
 
diff --git a/changelog.d/10015.bugfix b/changelog.d/10015.bugfix
deleted file mode 100644
index cbebd97e58..0000000000
--- a/changelog.d/10015.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Prevent device names from appearing in device list updates when `allow_device_name_lookup_over_federation` is `false`.
\ No newline at end of file
diff --git a/changelog.d/13394.feature b/changelog.d/13394.feature
deleted file mode 100644
index df3ce45a76..0000000000
--- a/changelog.d/13394.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for [MSC3856](https://github.com/matrix-org/matrix-spec-proposals/pull/3856): threads list API.
diff --git a/changelog.d/13776.feature b/changelog.d/13776.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/13776.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/13813.bugfix b/changelog.d/13813.bugfix
deleted file mode 100644
index 23388788ff..0000000000
--- a/changelog.d/13813.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a long-standing bug where redactions were not being sent over federation if we did not have the original event.
diff --git a/changelog.d/13816.feature b/changelog.d/13816.feature
deleted file mode 100644
index 5eaa936b08..0000000000
--- a/changelog.d/13816.feature
+++ /dev/null
@@ -1 +0,0 @@
-Stop fetching missing `prev_events` after we already know their signature is invalid.
diff --git a/changelog.d/13824.feature b/changelog.d/13824.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/13824.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/13877.feature b/changelog.d/13877.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/13877.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/13878.feature b/changelog.d/13878.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/13878.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/13955.docker b/changelog.d/13955.docker
deleted file mode 100644
index 043b5690a3..0000000000
--- a/changelog.d/13955.docker
+++ /dev/null
@@ -1 +0,0 @@
-Update the version of frozendict in Docker images and Debian packages from 2.3.3 to 2.3.4, which may fix memory leak problems.
diff --git a/changelog.d/13983.misc b/changelog.d/13983.misc
deleted file mode 100644
index 69ed75be90..0000000000
--- a/changelog.d/13983.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump actions/setup-python from 2 to 4.
diff --git a/changelog.d/13984.misc b/changelog.d/13984.misc
deleted file mode 100644
index 120d042fad..0000000000
--- a/changelog.d/13984.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-pyopenssl from 22.0.0 to 22.0.10.
diff --git a/changelog.d/13985.misc b/changelog.d/13985.misc
deleted file mode 100644
index 48e8960720..0000000000
--- a/changelog.d/13985.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump jsonschema from 4.4.0 to 4.16.0.
diff --git a/changelog.d/13986.misc b/changelog.d/13986.misc
deleted file mode 100644
index f71aed474b..0000000000
--- a/changelog.d/13986.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-setuptools from 57.4.9 to 65.4.0.0.
diff --git a/changelog.d/13987.misc b/changelog.d/13987.misc
deleted file mode 100644
index b1164201be..0000000000
--- a/changelog.d/13987.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-requests from 2.27.11 to 2.28.11.
diff --git a/changelog.d/13988.misc b/changelog.d/13988.misc
deleted file mode 100644
index e8c6b4e9b1..0000000000
--- a/changelog.d/13988.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump isort from 5.7.0 to 5.10.1.
diff --git a/changelog.d/13991.misc b/changelog.d/13991.misc
deleted file mode 100644
index f425fb17b2..0000000000
--- a/changelog.d/13991.misc
+++ /dev/null
@@ -1 +0,0 @@
-Optimise queries used to get a users rooms during sync. Contributed by Nick @ Beeper (@fizzadar).
diff --git a/changelog.d/13996.feature b/changelog.d/13996.feature
deleted file mode 100644
index 771f1c97a3..0000000000
--- a/changelog.d/13996.feature
+++ /dev/null
@@ -1 +0,0 @@
-Send application service access tokens as a header (and query parameter). Implement [MSC2832](https://github.com/matrix-org/matrix-spec-proposals/pull/2832).
diff --git a/changelog.d/13997.feature b/changelog.d/13997.feature
deleted file mode 100644
index 23f7ed106f..0000000000
--- a/changelog.d/13997.feature
+++ /dev/null
@@ -1 +0,0 @@
-Ignore server ACL changes when generating pushes. Implement [MSC3786](https://github.com/matrix-org/matrix-spec-proposals/pull/3786).
diff --git a/changelog.d/14006.misc b/changelog.d/14006.misc
deleted file mode 100644
index c06dcadf02..0000000000
--- a/changelog.d/14006.misc
+++ /dev/null
@@ -1 +0,0 @@
-Update authlib from 0.15.5 to 1.1.0.
diff --git a/changelog.d/14007.misc b/changelog.d/14007.misc
deleted file mode 100644
index 3f0f3afe1c..0000000000
--- a/changelog.d/14007.misc
+++ /dev/null
@@ -1 +0,0 @@
-Make `parse_server_name` consistent in handling invalid server names.
\ No newline at end of file
diff --git a/changelog.d/14018.feature b/changelog.d/14018.feature
deleted file mode 100644
index c8454607eb..0000000000
--- a/changelog.d/14018.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for redirecting to an implementation of a [MSC3886](https://github.com/matrix-org/matrix-spec-proposals/pull/3886) HTTP rendezvous service.
\ No newline at end of file
diff --git a/changelog.d/14028.feature b/changelog.d/14028.feature
deleted file mode 100644
index 6f5663a0ef..0000000000
--- a/changelog.d/14028.feature
+++ /dev/null
@@ -1 +0,0 @@
-The `/relations` endpoint can now be used on workers.
diff --git a/changelog.d/14032.feature b/changelog.d/14032.feature
deleted file mode 100644
index 016c704227..0000000000
--- a/changelog.d/14032.feature
+++ /dev/null
@@ -1 +0,0 @@
-Advertise support for Matrix 1.3 and 1.4 on `/_matrix/client/versions`.
diff --git a/changelog.d/14033.misc b/changelog.d/14033.misc
deleted file mode 100644
index fe42852aa5..0000000000
--- a/changelog.d/14033.misc
+++ /dev/null
@@ -1 +0,0 @@
-Don't repeatedly wake up the same users for batched events.
\ No newline at end of file
diff --git a/changelog.d/14034.bugfix b/changelog.d/14034.bugfix
deleted file mode 100644
index e437ef3a01..0000000000
--- a/changelog.d/14034.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a long-standing bug where edits of non-`m.room.message` events would not be correctly bundled or have their new content applied.
diff --git a/changelog.d/14040.misc b/changelog.d/14040.misc
deleted file mode 100644
index 1a4d3146b5..0000000000
--- a/changelog.d/14040.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump msgpack from 1.0.3 to 1.0.4.
diff --git a/changelog.d/14041.misc b/changelog.d/14041.misc
deleted file mode 100644
index a2119627f8..0000000000
--- a/changelog.d/14041.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-pyyaml from 6.0.4 to 6.0.12.
diff --git a/changelog.d/14043.misc b/changelog.d/14043.misc
deleted file mode 100644
index 102dc5c773..0000000000
--- a/changelog.d/14043.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump phonenumbers from 8.12.44 to 8.12.56.
diff --git a/changelog.d/14044.misc b/changelog.d/14044.misc
deleted file mode 100644
index 0909739a25..0000000000
--- a/changelog.d/14044.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump pydantic from 1.9.1 to 1.10.2.
diff --git a/changelog.d/14046.misc b/changelog.d/14046.misc
deleted file mode 100644
index 69ed75be90..0000000000
--- a/changelog.d/14046.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump actions/setup-python from 2 to 4.
diff --git a/changelog.d/14050.feature b/changelog.d/14050.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/14050.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/14053.bugfix b/changelog.d/14053.bugfix
deleted file mode 100644
index 07769f51d0..0000000000
--- a/changelog.d/14053.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a bug introduced in Synapse 1.53.0 when querying `/publicRooms` with both a `room_type` filter and a `third_party_instance_id`.
diff --git a/changelog.d/14054.feature b/changelog.d/14054.feature
deleted file mode 100644
index 9cf3f7a557..0000000000
--- a/changelog.d/14054.feature
+++ /dev/null
@@ -1 +0,0 @@
-Improve validation of request bodies for the [Device Management](https://spec.matrix.org/v1.4/client-server-api/#device-management) and [MSC2697 Device Dehyrdation](https://github.com/matrix-org/matrix-spec-proposals/pull/2697) client-server API endpoints.
diff --git a/changelog.d/14063.misc b/changelog.d/14063.misc
deleted file mode 100644
index f0d1e47f1a..0000000000
--- a/changelog.d/14063.misc
+++ /dev/null
@@ -1 +0,0 @@
-Complement test image: capture logs from nginx.
diff --git a/changelog.d/14065.misc b/changelog.d/14065.misc
deleted file mode 100644
index 98998b0015..0000000000
--- a/changelog.d/14065.misc
+++ /dev/null
@@ -1 +0,0 @@
-Fix a bug introduced in Synapse 1.35.0 where errors parsing a `/send_join` or `/state` response would produce excessive, low-quality Sentry events.
diff --git a/changelog.d/14072.misc b/changelog.d/14072.misc
deleted file mode 100644
index 3070c756d5..0000000000
--- a/changelog.d/14072.misc
+++ /dev/null
@@ -1 +0,0 @@
-Don't create noisy Sentry events when a requester drops connection to the metrics server mid-request.
diff --git a/changelog.d/14077.doc b/changelog.d/14077.doc
deleted file mode 100644
index 7853e7cd5e..0000000000
--- a/changelog.d/14077.doc
+++ /dev/null
@@ -1 +0,0 @@
-Add sample worker files for `pusher` and `federation_sender`.
diff --git a/changelog.d/14078.doc b/changelog.d/14078.doc
deleted file mode 100644
index cbe3c8b381..0000000000
--- a/changelog.d/14078.doc
+++ /dev/null
@@ -1 +0,0 @@
-Improve the listener example on the metrics documentation.
diff --git a/changelog.d/14081.doc b/changelog.d/14081.doc
deleted file mode 100644
index 0a6925b3bf..0000000000
--- a/changelog.d/14081.doc
+++ /dev/null
@@ -1 +0,0 @@
-Expand Google OpenID Connect example config to map email attribute. Contributed by @ptman.
diff --git a/changelog.d/14083.bugfix b/changelog.d/14083.bugfix
deleted file mode 100644
index 752982b1ca..0000000000
--- a/changelog.d/14083.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a long-standing bug where Synapse would error on the optional 'invite_room_state' field not being provided to [`PUT /_matrix/federation/v2/invite/{roomId}/{eventId}`](https://spec.matrix.org/v1.4/server-server-api/#put_matrixfederationv2inviteroomideventid).
\ No newline at end of file
diff --git a/changelog.d/14087.doc b/changelog.d/14087.doc
deleted file mode 100644
index 28d1ce67c5..0000000000
--- a/changelog.d/14087.doc
+++ /dev/null
@@ -1 +0,0 @@
-The changelog entry ending in a full stop or exclamation mark is not optional.
diff --git a/changelog.d/14089.bugfix b/changelog.d/14089.bugfix
deleted file mode 100644
index 4a398921bb..0000000000
--- a/changelog.d/14089.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a bug where invalid oEmbed fields would cause the entire response to be discarded. Introduced in Synapse 1.18.0.
diff --git a/changelog.d/14092.misc b/changelog.d/14092.misc
deleted file mode 100644
index c48f40cd38..0000000000
--- a/changelog.d/14092.misc
+++ /dev/null
@@ -1 +0,0 @@
-Run the integration test suites with the asyncio reactor enabled in CI.
diff --git a/changelog.d/14093.doc b/changelog.d/14093.doc
deleted file mode 100644
index cb1ff9490e..0000000000
--- a/changelog.d/14093.doc
+++ /dev/null
@@ -1 +0,0 @@
-Fix links to jemalloc documentation, which were broken in #13491.
diff --git a/changelog.d/14094.removal b/changelog.d/14094.removal
deleted file mode 100644
index 6ef03b1a0f..0000000000
--- a/changelog.d/14094.removal
+++ /dev/null
@@ -1 +0,0 @@
-Remove the experimental implementation of [MSC3772](https://github.com/matrix-org/matrix-spec-proposals/pull/3772).
diff --git a/changelog.d/14095.misc b/changelog.d/14095.misc
deleted file mode 100644
index 3483201d5f..0000000000
--- a/changelog.d/14095.misc
+++ /dev/null
@@ -1 +0,0 @@
-Add debug logs to figure out why an event was filtered out of the client response.
diff --git a/changelog.d/14097.misc b/changelog.d/14097.misc
deleted file mode 100644
index 8392448c4d..0000000000
--- a/changelog.d/14097.misc
+++ /dev/null
@@ -1 +0,0 @@
-Indicate what endpoint came back with a JSON response we were unable to parse.
diff --git a/changelog.d/14102.bugfix b/changelog.d/14102.bugfix
deleted file mode 100644
index d71e108f7c..0000000000
--- a/changelog.d/14102.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a bug introduced in Synapse v1.37.0 in which an incorrect key name was used for sending and receiving room metadata when knocking on a room.
\ No newline at end of file
diff --git a/changelog.d/14106.removal b/changelog.d/14106.removal
deleted file mode 100644
index 08fa752897..0000000000
--- a/changelog.d/14106.removal
+++ /dev/null
@@ -1 +0,0 @@
-Remove the unstable identifier for [MSC3715](https://github.com/matrix-org/matrix-doc/pull/3715).
diff --git a/changelog.d/14107.doc b/changelog.d/14107.doc
deleted file mode 100644
index 7063de05cd..0000000000
--- a/changelog.d/14107.doc
+++ /dev/null
@@ -1 +0,0 @@
-Remove not needed `replication` listener in docker compose example.
diff --git a/changelog.d/14109.misc b/changelog.d/14109.misc
deleted file mode 100644
index 7987c2050f..0000000000
--- a/changelog.d/14109.misc
+++ /dev/null
@@ -1 +0,0 @@
-Break up calls to fetch rooms for many users. Contributed by Nick @ Beeper (@fizzadar).
diff --git a/changelog.d/14113.misc b/changelog.d/14113.misc
deleted file mode 100644
index 11aafc63ed..0000000000
--- a/changelog.d/14113.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-pillow from 9.0.15 to 9.2.2.
diff --git a/changelog.d/14114.misc b/changelog.d/14114.misc
deleted file mode 100644
index 273f82c382..0000000000
--- a/changelog.d/14114.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-psycopg2 from 2.9.9 to 2.9.21.1.
diff --git a/changelog.d/14115.misc b/changelog.d/14115.misc
deleted file mode 100644
index d93581fac4..0000000000
--- a/changelog.d/14115.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump idna from 3.3 to 3.4.
diff --git a/changelog.d/14116.misc b/changelog.d/14116.misc
deleted file mode 100644
index e020fad075..0000000000
--- a/changelog.d/14116.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump bleach from 4.1.0 to 5.0.1.
diff --git a/changelog.d/14124.doc b/changelog.d/14124.doc
deleted file mode 100644
index f578f93616..0000000000
--- a/changelog.d/14124.doc
+++ /dev/null
@@ -1 +0,0 @@
-Fix name of `alias_creation_rules` option in the config manual documentation.
\ No newline at end of file
diff --git a/changelog.d/14125.bugfix b/changelog.d/14125.bugfix
deleted file mode 100644
index 852f00ebb9..0000000000
--- a/changelog.d/14125.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a bug introduced in v1.69.0rc1 where the joined hosts for a given event were not being properly cached.
diff --git a/changelog.d/14126.misc b/changelog.d/14126.misc
deleted file mode 100644
index 30b3482fbd..0000000000
--- a/changelog.d/14126.misc
+++ /dev/null
@@ -1 +0,0 @@
-Faster joins: prioritise the server we joined by when restarting a partial join resync.
diff --git a/changelog.d/14129.bugfix b/changelog.d/14129.bugfix
deleted file mode 100644
index c392d07d22..0000000000
--- a/changelog.d/14129.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix pinning Rust dependencies in docker images.
diff --git a/changelog.d/14130.misc b/changelog.d/14130.misc
deleted file mode 100644
index b801e172f0..0000000000
--- a/changelog.d/14130.misc
+++ /dev/null
@@ -1 +0,0 @@
-Cache Rust build cache when building docker images.
diff --git a/changelog.d/14132.misc b/changelog.d/14132.misc
deleted file mode 100644
index c9df48599b..0000000000
--- a/changelog.d/14132.misc
+++ /dev/null
@@ -1 +0,0 @@
-Enable dependabot for Rust dependencies.
diff --git a/changelog.d/14134.misc b/changelog.d/14134.misc
deleted file mode 100644
index 1ce679b331..0000000000
--- a/changelog.d/14134.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump typing-extensions from 4.1.1 to 4.4.0.
diff --git a/changelog.d/14140.feature b/changelog.d/14140.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/14140.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/14141.docker b/changelog.d/14141.docker
deleted file mode 100644
index 561806cdae..0000000000
--- a/changelog.d/14141.docker
+++ /dev/null
@@ -1 +0,0 @@
-Use the `minimal` Rust profile when building Synapse.
diff --git a/changelog.d/14141.misc b/changelog.d/14141.misc
deleted file mode 100644
index 561806cdae..0000000000
--- a/changelog.d/14141.misc
+++ /dev/null
@@ -1 +0,0 @@
-Use the `minimal` Rust profile when building Synapse.
diff --git a/changelog.d/14142.misc b/changelog.d/14142.misc
deleted file mode 100644
index 3649317013..0000000000
--- a/changelog.d/14142.misc
+++ /dev/null
@@ -1 +0,0 @@
-Remove unused configuration code.
diff --git a/changelog.d/14144.misc b/changelog.d/14144.misc
deleted file mode 100644
index 8a136f5290..0000000000
--- a/changelog.d/14144.misc
+++ /dev/null
@@ -1 +0,0 @@
-Prepare for the [`gotestfmt` repository move](https://github.com/GoTestTools/gotestfmt/discussions/46).
diff --git a/changelog.d/14145.doc b/changelog.d/14145.doc
deleted file mode 100644
index 8f876e08fc..0000000000
--- a/changelog.d/14145.doc
+++ /dev/null
@@ -1,2 +0,0 @@
-Clarify comment on event contexts.
-
diff --git a/changelog.d/14146.removal b/changelog.d/14146.removal
deleted file mode 100644
index 08fa752897..0000000000
--- a/changelog.d/14146.removal
+++ /dev/null
@@ -1 +0,0 @@
-Remove the unstable identifier for [MSC3715](https://github.com/matrix-org/matrix-doc/pull/3715).
diff --git a/changelog.d/14148.feature b/changelog.d/14148.feature
deleted file mode 100644
index 951d0cac80..0000000000
--- a/changelog.d/14148.feature
+++ /dev/null
@@ -1 +0,0 @@
-Experimental support for [MSC3874](https://github.com/matrix-org/matrix-spec-proposals/pull/3874).
diff --git a/changelog.d/14155.misc b/changelog.d/14155.misc
deleted file mode 100644
index 79539cdc32..0000000000
--- a/changelog.d/14155.misc
+++ /dev/null
@@ -1 +0,0 @@
-Invalidate rooms for user caches on replicated event, fix sync cache race in synapse workers. Contributed by Nick @ Beeper (@fizzadar).
diff --git a/changelog.d/14159.feature b/changelog.d/14159.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/14159.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/14161.bugfix b/changelog.d/14161.bugfix
deleted file mode 100644
index aed4d9e386..0000000000
--- a/changelog.d/14161.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a bug introduced in 1.30.0 where purging and rejoining a room without restarting in-between would result in a broken room.
\ No newline at end of file
diff --git a/changelog.d/14163.feature b/changelog.d/14163.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/14163.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/14164.bugfix b/changelog.d/14164.bugfix
deleted file mode 100644
index aed4d9e386..0000000000
--- a/changelog.d/14164.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix a bug introduced in 1.30.0 where purging and rejoining a room without restarting in-between would result in a broken room.
\ No newline at end of file
diff --git a/changelog.d/14165.docker b/changelog.d/14165.docker
deleted file mode 100644
index 7f4bc62520..0000000000
--- a/changelog.d/14165.docker
+++ /dev/null
@@ -1 +0,0 @@
-Prevent a class of database sharding errors when using `Dockerfile-workers` to spawn multiple instances of the same worker. Contributed by Jason Little.
diff --git a/changelog.d/14171.feature b/changelog.d/14171.feature
deleted file mode 100644
index df3ce45a76..0000000000
--- a/changelog.d/14171.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for [MSC3856](https://github.com/matrix-org/matrix-spec-proposals/pull/3856): threads list API.
diff --git a/changelog.d/14174.feature b/changelog.d/14174.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/14174.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/14175.feature b/changelog.d/14175.feature
deleted file mode 100644
index df3ce45a76..0000000000
--- a/changelog.d/14175.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for [MSC3856](https://github.com/matrix-org/matrix-spec-proposals/pull/3856): threads list API.
diff --git a/changelog.d/14179.feature b/changelog.d/14179.feature
deleted file mode 100644
index 48f2db91d3..0000000000
--- a/changelog.d/14179.feature
+++ /dev/null
@@ -1 +0,0 @@
-Improve the validation of the following PUT endpoints: [`/directory/room/{roomAlias}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3directoryroomroomalias), [`/directory/list/room/{roomId}`](https://spec.matrix.org/v1.4/client-server-api/#put_matrixclientv3directorylistroomroomid) and [`/directory/list/appservice/{networkId}/{roomId}`](https://spec.matrix.org/v1.4/application-service-api/#put_matrixclientv3directorylistappservicenetworkidroomid).
diff --git a/changelog.d/14182.docker b/changelog.d/14182.docker
deleted file mode 100644
index a0ce1bce53..0000000000
--- a/changelog.d/14182.docker
+++ /dev/null
@@ -1 +0,0 @@
-Set LD_PRELOAD to use jemalloc memory allocator in Dockerfile-workers.
diff --git a/changelog.d/14184.feature b/changelog.d/14184.feature
deleted file mode 100644
index 016c704227..0000000000
--- a/changelog.d/14184.feature
+++ /dev/null
@@ -1 +0,0 @@
-Advertise support for Matrix 1.3 and 1.4 on `/_matrix/client/versions`.
diff --git a/changelog.d/14186.misc b/changelog.d/14186.misc
deleted file mode 100644
index 7b369cd871..0000000000
--- a/changelog.d/14186.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump bcrypt from 3.2.0 to 4.0.1.
diff --git a/changelog.d/14187.misc b/changelog.d/14187.misc
deleted file mode 100644
index 2e40b737a7..0000000000
--- a/changelog.d/14187.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-pillow from 9.2.2 to 9.2.2.1.
diff --git a/changelog.d/14188.misc b/changelog.d/14188.misc
deleted file mode 100644
index 57eadcf197..0000000000
--- a/changelog.d/14188.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-bleach from 4.1.4 to 5.0.3.
diff --git a/changelog.d/14189.doc b/changelog.d/14189.doc
deleted file mode 100644
index 6c7e556ad9..0000000000
--- a/changelog.d/14189.doc
+++ /dev/null
@@ -1 +0,0 @@
-Fix dead link to the [Admin Registration API](https://matrix-org.github.io/synapse/latest/admin_api/register_api.html).
diff --git a/changelog.d/14195.docker b/changelog.d/14195.docker
deleted file mode 100644
index d755a79599..0000000000
--- a/changelog.d/14195.docker
+++ /dev/null
@@ -1 +0,0 @@
-Fix pre-startup logging being lost when using the `Dockerfile-workers` image.
diff --git a/changelog.d/14198.misc b/changelog.d/14198.misc
deleted file mode 100644
index 9d56f8a2c6..0000000000
--- a/changelog.d/14198.misc
+++ /dev/null
@@ -1 +0,0 @@
-Enable url previews when testing with complement.
\ No newline at end of file
diff --git a/changelog.d/14200.misc b/changelog.d/14200.misc
deleted file mode 100644
index 97c6934c23..0000000000
--- a/changelog.d/14200.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump psycopg2 from 2.9.3 to 2.9.4.
diff --git a/changelog.d/14201.misc b/changelog.d/14201.misc
deleted file mode 100644
index 1828206a9b..0000000000
--- a/changelog.d/14201.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump click from 8.1.1 to 8.1.3.
diff --git a/changelog.d/14206.misc b/changelog.d/14206.misc
deleted file mode 100644
index 005e1225a4..0000000000
--- a/changelog.d/14206.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump pygithub from 1.55 to 1.56.
diff --git a/changelog.d/14207.misc b/changelog.d/14207.misc
deleted file mode 100644
index 1f2d99e9b0..0000000000
--- a/changelog.d/14207.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump twisted from 22.4.0 to 22.8.0.
diff --git a/changelog.d/14208.misc b/changelog.d/14208.misc
deleted file mode 100644
index 6d4c196228..0000000000
--- a/changelog.d/14208.misc
+++ /dev/null
@@ -1 +0,0 @@
-Bump types-setuptools from 65.4.0.0 to 65.5.0.1.
diff --git a/changelog.d/14212.feature b/changelog.d/14212.feature
deleted file mode 100644
index 53b135cb5c..0000000000
--- a/changelog.d/14212.feature
+++ /dev/null
@@ -1 +0,0 @@
-Build and publish binary wheels for `aarch64` platforms.
\ No newline at end of file
diff --git a/changelog.d/14214.misc b/changelog.d/14214.misc
deleted file mode 100644
index 102928b575..0000000000
--- a/changelog.d/14214.misc
+++ /dev/null
@@ -1 +0,0 @@
-When authenticating batched events, check for auth events in batch as well as DB.
diff --git a/changelog.d/14215.bugfix b/changelog.d/14215.bugfix
deleted file mode 100644
index 31c109f534..0000000000
--- a/changelog.d/14215.bugfix
+++ /dev/null
@@ -1 +0,0 @@
-Fix [MSC3030](https://github.com/matrix-org/matrix-spec-proposals/pull/3030) `/timestamp_to_event` endpoint returning potentially inaccurate closest events with `outliers` present.
diff --git a/changelog.d/14216.misc b/changelog.d/14216.misc
deleted file mode 100644
index 6fad16d83d..0000000000
--- a/changelog.d/14216.misc
+++ /dev/null
@@ -1 +0,0 @@
-Update CI config to avoid GitHub Actions deprecation warnings.
diff --git a/changelog.d/14217.misc b/changelog.d/14217.misc
deleted file mode 100644
index 625df66637..0000000000
--- a/changelog.d/14217.misc
+++ /dev/null
@@ -1 +0,0 @@
-Update dependency requirements to allow building with poetry-core 1.3.2.
diff --git a/changelog.d/14221.misc b/changelog.d/14221.misc
deleted file mode 100644
index fe7afac245..0000000000
--- a/changelog.d/14221.misc
+++ /dev/null
@@ -1 +0,0 @@
-Rename the `cache_memory` extra to `cache-memory`, for compatability with poetry-core 1.3.0 and [PEP 685](https://peps.python.org/pep-0685/). From-source installations using this extra will need to install using the new name.
diff --git a/changelog.d/14222.feature b/changelog.d/14222.feature
deleted file mode 100644
index 5d0ae16e13..0000000000
--- a/changelog.d/14222.feature
+++ /dev/null
@@ -1 +0,0 @@
-Support for thread-specific notifications & receipts ([MSC3771](https://github.com/matrix-org/matrix-spec-proposals/pull/3771) and [MSC3773](https://github.com/matrix-org/matrix-spec-proposals/pull/3773)).
diff --git a/changelog.d/14224.misc b/changelog.d/14224.misc
deleted file mode 100644
index 6fad16d83d..0000000000
--- a/changelog.d/14224.misc
+++ /dev/null
@@ -1 +0,0 @@
-Update CI config to avoid GitHub Actions deprecation warnings.
diff --git a/changelog.d/14227.misc b/changelog.d/14227.misc
deleted file mode 100644
index 103c71b390..0000000000
--- a/changelog.d/14227.misc
+++ /dev/null
@@ -1 +0,0 @@
-Specify dev-dependencies using lower bounds, to reduce the likelihood of a dependabot merge conflict. The lockfile continues to pin to specific versions.
diff --git a/changelog.d/14248.bugfix b/changelog.d/14248.bugfix
new file mode 100644
index 0000000000..203c52c16b
--- /dev/null
+++ b/changelog.d/14248.bugfix
@@ -0,0 +1 @@
+Fix a bug introduced in Synapse 1.70.0rc1 where the information returned from the `/threads` API could be stale when threaded events are redacted.
diff --git a/changelog.d/14253.misc b/changelog.d/14253.misc
new file mode 100644
index 0000000000..c1382ddafa
--- /dev/null
+++ b/changelog.d/14253.misc
@@ -0,0 +1 @@
+Build ABI3 wheels for cpython.
diff --git a/changelog.d/14259.misc b/changelog.d/14259.misc
new file mode 100644
index 0000000000..7425498964
--- /dev/null
+++ b/changelog.d/14259.misc
@@ -0,0 +1 @@
+Only build aarch64 wheels for cpython manylinux.
diff --git a/changelog.d/14280.bugfix b/changelog.d/14280.bugfix
new file mode 100644
index 0000000000..c546d2be48
--- /dev/null
+++ b/changelog.d/14280.bugfix
@@ -0,0 +1 @@
+Fix broken outbound federation when using Python 3.7. Broke in v1.70.0rc1.
diff --git a/changelog.d/14283.bugfix b/changelog.d/14283.bugfix
new file mode 100644
index 0000000000..a80a8c0361
--- /dev/null
+++ b/changelog.d/14283.bugfix
@@ -0,0 +1 @@
+Fix a bug introduced in Synapse 1.70.0rc1 where edits to non-message events were aggregated by the homeserver.
diff --git a/debian/changelog b/debian/changelog
index f1de7b15d5..60ec92b47d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+matrix-synapse-py3 (1.70.0~rc1) stable; urgency=medium
+
+  * New Synapse release 1.70.0rc1.
+
+ -- Synapse Packaging team <packages@matrix.org>  Wed, 19 Oct 2022 14:11:57 +0100
+
 matrix-synapse-py3 (1.69.0) stable; urgency=medium
 
   * New Synapse release 1.69.0.
diff --git a/pyproject.toml b/pyproject.toml
index 554eed0fa4..ec0fbd1eb9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -57,7 +57,7 @@ manifest-path = "rust/Cargo.toml"
 
 [tool.poetry]
 name = "matrix-synapse"
-version = "1.69.0"
+version = "1.70.0rc1"
 description = "Homeserver for the Matrix decentralised comms protocol"
 authors = ["Matrix.org Team and Contributors <packages@matrix.org>"]
 license = "Apache-2.0"
@@ -318,7 +318,7 @@ build-backend = "poetry.core.masonry.api"
 
 [tool.cibuildwheel]
 # Skip unsupported platforms (by us or by Rust).
-skip = "cp36* *-musllinux_i686"
+skip = "cp36* *-musllinux_i686 pp*aarch64 *-musllinux_aarch64"
 
 # We need a rust compiler
 before-all =  "curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y --profile minimal"
@@ -330,3 +330,12 @@ environment= { PATH = "$PATH:$HOME/.cargo/bin" }
 before-build = "rm -rf {project}/build"
 build-frontend = "build"
 test-command = "python -c 'from synapse.synapse_rust import sum_as_string; print(sum_as_string(1, 2))'"
+
+
+[tool.cibuildwheel.linux]
+# Wrap the repair command to correctly rename the built cpython wheels as ABI3.
+repair-wheel-command = "./.ci/scripts/auditwheel_wrapper.py -w {dest_dir} {wheel}"
+
+[tool.cibuildwheel.macos]
+# Wrap the repair command to correctly rename the built cpython wheels as ABI3.
+repair-wheel-command = "./.ci/scripts/auditwheel_wrapper.py --require-archs {delocate_archs} -w {dest_dir} {wheel}"
diff --git a/synapse/federation/sender/__init__.py b/synapse/federation/sender/__init__.py
index 774ecd81b6..3ad483efe0 100644
--- a/synapse/federation/sender/__init__.py
+++ b/synapse/federation/sender/__init__.py
@@ -536,8 +536,7 @@ class FederationSender(AbstractFederationSender):
 
                 if event_entries:
                     now = self.clock.time_msec()
-                    last_id = next(reversed(event_ids))
-                    ts = event_to_received_ts[last_id]
+                    ts = max(t for t in event_to_received_ts.values() if t)
                     assert ts is not None
 
                     synapse.metrics.event_processing_lag.labels(
diff --git a/synapse/storage/databases/main/events.py b/synapse/storage/databases/main/events.py
index 6698cbf664..00880bb37d 100644
--- a/synapse/storage/databases/main/events.py
+++ b/synapse/storage/databases/main/events.py
@@ -2028,25 +2028,37 @@ class PersistEventsStore:
             redacted_event_id: The event that was redacted.
         """
 
-        # Fetch the current relation of the event being redacted.
-        redacted_relates_to = self.db_pool.simple_select_one_onecol_txn(
+        # Fetch the relation of the event being redacted.
+        row = self.db_pool.simple_select_one_txn(
             txn,
             table="event_relations",
             keyvalues={"event_id": redacted_event_id},
-            retcol="relates_to_id",
+            retcols=("relates_to_id", "relation_type"),
             allow_none=True,
         )
+        # Nothing to do if no relation is found.
+        if row is None:
+            return
+
+        redacted_relates_to = row["relates_to_id"]
+        rel_type = row["relation_type"]
+        self.db_pool.simple_delete_txn(
+            txn, table="event_relations", keyvalues={"event_id": redacted_event_id}
+        )
+
         # Any relation information for the related event must be cleared.
-        if redacted_relates_to is not None:
-            self.store._invalidate_cache_and_stream(
-                txn, self.store.get_relations_for_event, (redacted_relates_to,)
-            )
+        self.store._invalidate_cache_and_stream(
+            txn, self.store.get_relations_for_event, (redacted_relates_to,)
+        )
+        if rel_type == RelationTypes.ANNOTATION:
             self.store._invalidate_cache_and_stream(
                 txn, self.store.get_aggregation_groups_for_event, (redacted_relates_to,)
             )
+        if rel_type == RelationTypes.REPLACE:
             self.store._invalidate_cache_and_stream(
                 txn, self.store.get_applicable_edit, (redacted_relates_to,)
             )
+        if rel_type == RelationTypes.THREAD:
             self.store._invalidate_cache_and_stream(
                 txn, self.store.get_thread_summary, (redacted_relates_to,)
             )
@@ -2057,9 +2069,38 @@ class PersistEventsStore:
                 txn, self.store.get_threads, (room_id,)
             )
 
-        self.db_pool.simple_delete_txn(
-            txn, table="event_relations", keyvalues={"event_id": redacted_event_id}
-        )
+            # Find the new latest event in the thread.
+            sql = """
+            SELECT event_id, topological_ordering, stream_ordering
+            FROM event_relations
+            INNER JOIN events USING (event_id)
+            WHERE relates_to_id = ? AND relation_type = ?
+            ORDER BY topological_ordering DESC, stream_ordering DESC
+            LIMIT 1
+            """
+            txn.execute(sql, (redacted_relates_to, RelationTypes.THREAD))
+
+            # If a latest event is found, update the threads table, this might
+            # be the same current latest event (if an earlier event in the thread
+            # was redacted).
+            latest_event_row = txn.fetchone()
+            if latest_event_row:
+                self.db_pool.simple_upsert_txn(
+                    txn,
+                    table="threads",
+                    keyvalues={"room_id": room_id, "thread_id": redacted_relates_to},
+                    values={
+                        "latest_event_id": latest_event_row[0],
+                        "topological_ordering": latest_event_row[1],
+                        "stream_ordering": latest_event_row[2],
+                    },
+                )
+
+            # Otherwise, delete the thread: it no longer exists.
+            else:
+                self.db_pool.simple_delete_one_txn(
+                    txn, table="threads", keyvalues={"thread_id": redacted_relates_to}
+                )
 
     def _store_room_topic_txn(self, txn: LoggingTransaction, event: EventBase) -> None:
         if isinstance(event.content.get("topic"), str):
diff --git a/synapse/storage/databases/main/relations.py b/synapse/storage/databases/main/relations.py
index 1de62ee9df..c022510e76 100644
--- a/synapse/storage/databases/main/relations.py
+++ b/synapse/storage/databases/main/relations.py
@@ -484,11 +484,12 @@ class RelationsWorkerStore(SQLBaseStore):
             the event will map to None.
         """
 
-        # We only allow edits for events that have the same sender and event type.
-        # We can't assert these things during regular event auth so we have to do
-        # the checks post hoc.
+        # We only allow edits for `m.room.message` events that have the same sender
+        # and event type. We can't assert these things during regular event auth so
+        # we have to do the checks post hoc.
 
-        # Fetches latest edit that has the same type and sender as the original.
+        # Fetches latest edit that has the same type and sender as the
+        # original, and is an `m.room.message`.
         if isinstance(self.database_engine, PostgresEngine):
             # The `DISTINCT ON` clause will pick the *first* row it encounters,
             # so ordering by origin server ts + event ID desc will ensure we get
@@ -504,6 +505,7 @@ class RelationsWorkerStore(SQLBaseStore):
                 WHERE
                     %s
                     AND relation_type = ?
+                    AND edit.type = 'm.room.message'
                 ORDER by original.event_id DESC, edit.origin_server_ts DESC, edit.event_id DESC
             """
         else:
@@ -522,6 +524,7 @@ class RelationsWorkerStore(SQLBaseStore):
                 WHERE
                     %s
                     AND relation_type = ?
+                    AND edit.type = 'm.room.message'
                 ORDER by edit.origin_server_ts, edit.event_id
             """
 
diff --git a/tests/rest/client/test_relations.py b/tests/rest/client/test_relations.py
index ddf315b894..e3d801f7a8 100644
--- a/tests/rest/client/test_relations.py
+++ b/tests/rest/client/test_relations.py
@@ -1523,6 +1523,26 @@ class RelationRedactionTestCase(BaseRelationsTestCase):
         )
         self.assertEqual(200, channel.code, channel.json_body)
 
+    def _get_threads(self) -> List[Tuple[str, str]]:
+        """Request the threads in the room and returns a list of thread ID and latest event ID."""
+        # Request the threads in the room.
+        channel = self.make_request(
+            "GET",
+            f"/_matrix/client/v1/rooms/{self.room}/threads",
+            access_token=self.user_token,
+        )
+        self.assertEquals(200, channel.code, channel.json_body)
+        threads = channel.json_body["chunk"]
+        return [
+            (
+                t["event_id"],
+                t["unsigned"]["m.relations"][RelationTypes.THREAD]["latest_event"][
+                    "event_id"
+                ],
+            )
+            for t in threads
+        ]
+
     def test_redact_relation_annotation(self) -> None:
         """
         Test that annotations of an event are properly handled after the
@@ -1567,58 +1587,82 @@ class RelationRedactionTestCase(BaseRelationsTestCase):
         The redacted event should not be included in bundled aggregations or
         the response to relations.
         """
-        channel = self._send_relation(
-            RelationTypes.THREAD,
-            EventTypes.Message,
-            content={"body": "reply 1", "msgtype": "m.text"},
-        )
-        unredacted_event_id = channel.json_body["event_id"]
+        # Create a thread with a few events in it.
+        thread_replies = []
+        for i in range(3):
+            channel = self._send_relation(
+                RelationTypes.THREAD,
+                EventTypes.Message,
+                content={"body": f"reply {i}", "msgtype": "m.text"},
+            )
+            thread_replies.append(channel.json_body["event_id"])
 
-        # Note that the *last* event in the thread is redacted, as that gets
-        # included in the bundled aggregation.
-        channel = self._send_relation(
-            RelationTypes.THREAD,
-            EventTypes.Message,
-            content={"body": "reply 2", "msgtype": "m.text"},
+        ##################################################
+        # Check the test data is configured as expected. #
+        ##################################################
+        self.assertEquals(self._get_related_events(), list(reversed(thread_replies)))
+        relations = self._get_bundled_aggregations()
+        self.assertDictContainsSubset(
+            {"count": 3, "current_user_participated": True},
+            relations[RelationTypes.THREAD],
+        )
+        # The latest event is the last sent event.
+        self.assertEqual(
+            relations[RelationTypes.THREAD]["latest_event"]["event_id"],
+            thread_replies[-1],
         )
-        to_redact_event_id = channel.json_body["event_id"]
 
-        # Both relations exist.
-        event_ids = self._get_related_events()
+        # There should be one thread, the latest event is the event that will be redacted.
+        self.assertEqual(self._get_threads(), [(self.parent_id, thread_replies[-1])])
+
+        ##########################
+        # Redact the last event. #
+        ##########################
+        self._redact(thread_replies.pop())
+
+        # The thread should still exist, but the latest event should be updated.
+        self.assertEquals(self._get_related_events(), list(reversed(thread_replies)))
         relations = self._get_bundled_aggregations()
-        self.assertEquals(event_ids, [to_redact_event_id, unredacted_event_id])
         self.assertDictContainsSubset(
-            {
-                "count": 2,
-                "current_user_participated": True,
-            },
+            {"count": 2, "current_user_participated": True},
             relations[RelationTypes.THREAD],
         )
-        # And the latest event returned is the event that will be redacted.
+        # And the latest event is the last unredacted event.
         self.assertEqual(
             relations[RelationTypes.THREAD]["latest_event"]["event_id"],
-            to_redact_event_id,
+            thread_replies[-1],
         )
+        self.assertEqual(self._get_threads(), [(self.parent_id, thread_replies[-1])])
 
-        # Redact one of the reactions.
-        self._redact(to_redact_event_id)
+        ###########################################
+        # Redact the *first* event in the thread. #
+        ###########################################
+        self._redact(thread_replies.pop(0))
 
-        # The unredacted relation should still exist.
-        event_ids = self._get_related_events()
+        # Nothing should have changed (except the thread count).
+        self.assertEquals(self._get_related_events(), thread_replies)
         relations = self._get_bundled_aggregations()
-        self.assertEquals(event_ids, [unredacted_event_id])
         self.assertDictContainsSubset(
-            {
-                "count": 1,
-                "current_user_participated": True,
-            },
+            {"count": 1, "current_user_participated": True},
             relations[RelationTypes.THREAD],
         )
-        # And the latest event is now the unredacted event.
+        # And the latest event is the last unredacted event.
         self.assertEqual(
             relations[RelationTypes.THREAD]["latest_event"]["event_id"],
-            unredacted_event_id,
+            thread_replies[-1],
         )
+        self.assertEqual(self._get_threads(), [(self.parent_id, thread_replies[-1])])
+
+        ####################################
+        # Redact the last remaining event. #
+        ####################################
+        self._redact(thread_replies.pop(0))
+        self.assertEquals(thread_replies, [])
+
+        # The event should no longer be considered a thread.
+        self.assertEquals(self._get_related_events(), [])
+        self.assertEquals(self._get_bundled_aggregations(), {})
+        self.assertEqual(self._get_threads(), [])
 
     def test_redact_parent_edit(self) -> None:
         """Test that edits of an event are redacted when the original event