This Week in Matrix 2021-07-16

16.07.2021 00:00 โ€” This Week in Matrix โ€” Ben Parsons

Matrix Live ๐ŸŽ™

Dept of Spec ๐Ÿ“œ


anoa announced:

Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at

MSC Status

New MSCs:

MSCs with proposed Final Comment Period:

MSCs in Final Comment Period:

  • No MSCs are in FCP.

Closed MSCs:

Spec Updates

Several members of the Spec Core Team reviewed MSC2674 (Event relationships) this week in order to help push along the efforts to finally ship aggregations in the spec. Otherwise MSC3245 (voice messages via extensible events) is moving along with final comment period proposed this week. The implementation in Element Web in reportedly working well, helping to prove the spec in practice. And finally, MSC3277 (scheduled messages) which appeared over the weekend to try and allow for scheduling events to send later in Matrix (and all the fun edge cases that come with it).

Thanks to everyone who submitted, read and reviewed MSCs this week. It takes people to move this stuff forward!


Dept of GSoC ๐ŸŽ“๏ธ

Google Summer of Code 2021: first evaluations complete!

We heard from Callum last week, and will have more reports in future, but for now just know that all seven GSoC projects are progressing well. To remind yourself of this year's projects, see the list provided by Google or our welcome blog post.

Alexandre Franke added:

I reckon you can count the two Fractal interns as well. :)

Reckon you're right pardner! We'll look forward to a roundup of the work done for Fractal too.

Dept of Servers ๐Ÿข

Dendrite / gomatrixserverlib

Dendrite is a next-generation homeserver written in Go

Neil Alexander told us:

In case you missed it, we released Dendrite 0.4.0 on Monday and wrote a blog post about it! It's taken us a little while to get to this release, but it includes a number of quality-of-life improvements and changes that will significantly reduce the amount of resources needed to run a Dendrite server. The full changelog is available on GitHub and many juicy details in the aforementioned blog post, but at a high level this release includes:

  • All-new state storage, designed to reduce the amount of disk space that the roomserver takes up to store room state by aggressively deduplicating state blocks and snapshots

  • Improved appservice support, with a number of bridges now working with Dendrite

  • Shared secret registration (using the same API shape as Synapse)

  • Optimisations in the federation API /send and /get_missing_events endpoints to reduce memory usage

  • Improved state resolution v2 performance when dealing with power level events

  • Per-room queuing to reduce head-of-line blocking on the roomserver input API

  • Lots of bug fixes around invites, registration, sync and media, and 5 panics fixed

Since the release, we've been working on:

  • Completing key notary support

  • Fixing state_default for power levels in gomatrixserverlib

  • Resolving some issues around rejecting invites, particularly when the remote server is not available

  • Reducing the cost of checking if the local server is in a given room

Since our last update, our Sytest compliance numbers have been on the rise again, taking us ever closer to our goals:

  • Client-server APIs: 61%, up from 60% last time

  • Server-server APIs: 92%, up from 80% last time

  • Appservice APIs: 52%

As always, please feel free to join us in for general Dendrite chat, and if you are interested in contributing!


callahad told us:

The big news of the week is the release of Synapse 1.38, which converts several integer columns to bigint, allowing Synapse to process more than 2 billion (231) events. Which, incidentally, did last week ๐Ÿ“ˆ:


But that's not the only thing new in Synapse 1.38. We also landed the ability to set an expiry time on cache entries, allowing you to reclaim memory from infrequently accessed caches. Configuring this to "1h" on has already yielded a noticeable reduction in overall memory use ๐Ÿ“‰:


We'd encourage you to read the full announcement for more โ€” See you next week ๐Ÿ‘‹!

Registration management for Token Authenticated Registration

callum told us:

Another short update about my GSoC project, this time about the Synapse admin API for managing tokens.

See also Matrix Live with Callum last week.

Homeserver Deployment ๐Ÿ“ฅ๏ธ


Ananace said:

This week too brings updates to my Helm Charts, with Synapse having been updated to 1.38.0.

Dept of Bridges ๐ŸŒ‰


Fair said:

A bridge for LINE Messenger based on running LINE's Chrome extension in Puppeteer.

Docker is now supported, via Dockerfiles that actually work now! But for the time being, Docker images must be built manually, as I am yet to deploy a Docker registry for prebuilt images.

Also, sample systemd service unit configuration files are now available, courtesy of ๐Ÿ™‚

For more info on all of this, see

What I'm working on next is a bot command to list all of your LINE contacts & groups (similar to mautrix-whatsapp's list <contacts|groups>), and the ability to sync a LINE DM by inviting a contact to a Matrix DM. This will allow messaging LINE contacts that the bridge didn't yet create a portal for.

And please, feel free to try out this bridge! It should be serviceable for day-to-day usage now. I still won't be able to host a public instance of it for a while, though (as it is fairly hefty due to having to run Chrome), so you'll have to self-host if you want to try it.


Issue page:

Dept of Clients ๐Ÿ“ฑ


Nheko is a desktop client using Qt and C++17. It supports E2EE and intends to be full featured and nice to look at

Nico ( told us:

This week we fixed bugs. Switching room should now be quite a bit faster again and once Qt 6.3 is released with some important bugfixes, scrolling in Nheko should be super smooth. (We can't enable that flag yet, because of 3 bugs in the item pooling code in Qt.)

Other bugfixes:

  • Inline images sometimes wouldn't show, but now inline emotes and images should render once they are loaded! (This took me a year to figure out)

  • You can now send edits in encryted rooms again, if they are a reply to an event.

  • No more reply fallback in the room list.

  • At some point timed out verification requests started showing up on startup. That regression is fixed now.

  • Fix rooms not showing up after login because we were off by one.

  • Fix some cases where the loading spinner wouldn't stop animating and as such consistently use CPU, when a room is open.

  • Cache db transactions to reduce allocations and memory zeroing when loading a room or scrolling.

  • Fix some edge cases in the blurhash decoding, that could lead to brownish image previews.

  • Fix accepting an invite not placing you in the joined room.

Element Clients

With updates supplied by the teams

Delight team

  • Weโ€™ve been shepherding through MSCs to improve private spaces, namely MSC3083 (Restricting room membership based on space membership)
  • Meanwhile, weโ€™re also implementing outstanding polish, planning steps for Spaces to exit beta


  • v1.7.33-rc.1 now up for testing on with support for blurhash, draggable picture-in-picture view for calls
  • Contributing to element web? There are new labels and magic keywords for pull requests to show better information in the changelogs. See the contributor guide for more detail.
  • Do you use the master branch of element web or any of the web projects? Please let us know - it may go away soon.


  • Still polishing the voice message feature: add support for Android 5, improve timeline rendering, improve animation in the composer, support for RTL language
  • Work on the account notification settings


A minimal Matrix chat client, focused on performance, offline functionality, and broad browser support.

Bruno said:

Still working on getting a big update out today with rendering of formatted messages and a brand new member list in the right panel!

Dept of SDKs and Frameworks ๐Ÿงฐ


Aksem told us:

First news about Python bindings for libQuotient, C++ Qt-based Matrix SDK

After a month of hard work, we(I as GSoC student and kitsune as mentor) have bindings with tests for almost all core classes and also initial version of the demo client, in which you can log in with a password or SSO, the server you enter is resolved automatically and also after successful login data is being synchronized. There is also a possibility to log out. So this part is on the same level as in Quotient.

Also, a small video with the client in action.

Dept of Events and Talks ๐Ÿ—ฃ๏ธ

Hack'n'Sun, the partially-Matrix-based summer tinkering camp

Nik offered:

Over the first weeks of July, Teckids e.V. held their annual summer camp for kids between 9 and 15 years. This year, after we started introducing Matrix and Element as a chat platform from September 2020 onwards, the camp was heavily relying on the platform for various parts.

Before the camp started, we invited all 90 participants to a chat room to get together, share a bit about what they expect, already did with coding and technical stuff, talk about what food they'd like to have for the barbecue, and stuff like that. Many of them engaged in the discussion, and started exploring Element (before you ask, yes, we hat a lot of snow and party poppers ๐Ÿ˜›!). Some got really excited that they could even change or add features to Element, or ask for such changes โ€“ we had to promise to hold a session where we find out how to add one new animation to Element. Unfortunately, Element is developed on GitHub, so the potential young contributors are locked out by the exclusive Terms of Use there. We are trying to reach out to Element HQ to find a solution.

During the camp, verifying crypto sessions using emojis again made for a good party game to get to know each other (like, find the kid a nickname belongs to on the camp site, start verification, and compare emojis โ€“ a lot of fun that we, again, did not even have to start, because someone always finds out about it and asks what it is about).

Now that everyone got to know Matrix for chatting, in one of our workshops, the participants discovered that not only people, but also devices can send messages, and react to replies โ€“ in that workshop, the kids built a chat-ops IoT door beel (for their tent on site, or room at home). They soldered a circuit board to fit an ESP (MicroPython) micro controller on, and coded a small program (using templates with differing complexity levels), defining what the door bell should send when a button is pressed, on what messages to react, and the like. We produced a fun video about the project (German audio, English subtitles): . The (minimal and somewhat buggy) MicroPython client library is published as ยตtrix.

Now, sadly, the event is over, and we slowly see (as expected, only a part of the) participants moving over to our long-term project chatrooms; we will start clearing the virtual camp site chatroom during the weekend to make room for a new group.

Asked about the regularity of these events, Nik replied:

We are still experimenting with our new camp formats. As bad as it all is, COVID caused a lot of innovation here because we were forced to leave the known roads we normally travelled, and now we are starting to integrate all that new stuff (like really embracing Matrix) into outdoor and presence events. I think we are on a really good way with it, and surely I will keep posting updates that might be of interest for the greater community.

Dept of Interesting Projects ๐Ÿ›ฐ๏ธ

Cactus Comments ๐ŸŒต

carl announced:

Cactus Comments is a federated comment system for the open web built on Matrix.

This week, I'm reporting the changes to our backend service since it last appeared on

  • Feature: Restrict which users can interact with cactusbot (contributed by Karmanyaah Malhotra in MR !3).

  • Feature: Include comment section id in room name.

  • Bugfix: Malformed events no longer cause a crash loop.

  • Bugfix: Users can no longer register a site without a name.

  • Hotfix: Mitigated timeouts under heavy load with a temporary LRU cache.

  • Internal: Pin sub-dependencies.

  • Internal: Heavy linting in CI.

All these changes are available from version 0.5.0.


Matrix room:

Introductory blog post:

Source code:

Dept of Guides ๐Ÿงญ

New business-oriented guide to using Matrix and Element

The Reidel Law Firm from Galveston, Texas have produced an excellent business-oriented guide to using Matrix and Element. As they announced in a blog post last month:

Reidel Law Firm remains committed to providing top notch legal services in Franchise Law, International Trade Law, and Business Law while maintaining accessibility, (one of our Firmโ€™s core values) to our clients, colleagues, and friends of the firm. Utilizing our own secured chat platform allows us to be in communication with our clients around the world while maintaining the utmost in data security and client privacy.

Schuyler "Rocky" Reidel added:

I believe in Matrix+Element and encourage my clients and law firms to get ahead of the curve or get left behind and become irrelevant. Email has to die, its just the worst. Also, I forgot to note earlier that the guide is copyright free. I hope other business owners will use and revise it for their own uses.

Strong words! You can find the guide from Reidel on their website.

Final Thoughts ๐Ÿ’ญ

Room of the week

timokoesters told us:

Hi everyone! Did you ever feel lost in the Matrix world? The room directory is big, but it's still hard to find something you like. Or are you a room moderator, but there is not much activity in your room because it doesn't have enough users?

This is why I want to share rooms (or spaces) I find interesting.

This week's room is:

"The pinnacle of motorsport! We're in an exciting time in Formula 1 with a close championship and exciting battles. Come hang out and chat about the upcoming race in Silverstone on July 18th!"

If you want to suggest a room for this section, tell me in

Dept of Ping ๐Ÿ“

Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server.

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

That's all I know ๐Ÿ

See you next week, and be sure to stop by with your updates!

Synapse 1.38.0 released

13.07.2021 00:00 โ€” Releases โ€” Dan Callahan

Synapse 1.38.0 is out now!

NOTE: We released Synapse 1.38.1 on Thursday, July 22nd. It mitigates a client bug with Synapse 1.38.0's smaller sync responses which prevented new Element Android sessions from successfully participating in encrypted conversations. Server administrators are strongly encouraged to upgrade.

(Big) Integers

Synapse's database schema used integer columns in a few places where values could potentially overflow a maximum value of 231. One such column is events.stream_ordering, which surpassed 231 on last week.

To prevent overflows, Synapse 1.38 will automatically convert several integer columns to bigint as a background update. While homeservers will function normally during this task, it could result in increased disk I/O for several hours or days. Note that homeservers may need several gigabytes of free space to successfully rebuild associated database indexes and complete the upgrade.

See the upgrade notes for more details.

Expiring Caches

Synapse has a new configuration option, caches.expiry_time, which can be set to enable evicting items from caches if they go too long without being accessed. This helps servers reclaim memory used by large yet infrequently used caches.

Smaller Sync Responses

The response to /sync now omits optional keys when they would otherwise be empty. This can significantly reduce the size of incremental syncs, as demonstrated in #6579. Thanks to deepbluev7 for initially submitting this in #9919, which made it into this release via #10214.

Everything Else

A few other items worth calling out:

  • This release includes an experimental implementation of MSC2918: Refresh tokens, which adds initial support for complementary access / refresh tokens in line with OAuth best practices (#9450).
  • Synapse now ships a script to review recently registered accounts, which can be useful in cleaning up servers in the wake of malicious, automated registrations like we witnessed during last month's spam attack.
  • We've also fixed a few rough edges (#10263, #10303, #10336) in the spam mitigations from 1.37.1, and would encourage you to update.
  • The Admin API for querying user information now includes information about a user's SSO identities in its response.

These are just the highlights; please see the Upgrade Notes and Release Notes for a complete list of changes in this release.

Synapse is a Free and Open Source Software project, and we'd like to extend our thanks to everyone who contributed to this release, including deepbluev7, dklimpel, fkr, and sideshowbarker

Dendrite 0.4.0 Released

12.07.2021 00:00 โ€” Releases โ€” Neil Alexander

After quite a significant gap between releases โ€” version 0.3.11 was released at the beginning of March โ€” we're happy to finally announce the release of Dendrite 0.4.0 today!

The full changelog for the release is available on GitHub, but we wanted to take the opportunity to talk a little about some of the changes that have gone into this release.

Recently our release cadence for Dendrite has slowed as we have spent more time within the team working on Pinecone and Low Bandwidth Matrix. These are major areas of research for us which we hope will unlock a number of new opportunities within the Matrix ecosystem, allowing us to build on Matrix anywhere and to reduce the protocol-level footprint. However, Dendrite has not been forgotten amidst the excitement and we will be spending more time working on Dendrite again in the coming months.

State storage

One of the major features in v0.4.0 is that we've introduced newly-refactored state storage in the roomserver database. The goal here is to make state storage significantly more efficient by ensuring that we deduplicate state blocks and snapshots wherever we can. By ensuring that all state blocks and snapshots are ordered strictly, and by enforcing uniqueness constraints on the hashes of the blocks/snapshots, we've been able to achieve this.

This was largely spurred on by watching consuming a rather alarming amount of disk space on a daily basis. In this particular instance, moving to the new state storage resulted in a 15x improvement on disk utilisation for state blocks and a further 2x improvement for state snapshot references immediately after the migration, and the growth rate of the database has slowed substantially since.

Ensuring that we don't waste disk space is one of the most important factors in ensuring that Dendrite operates well at any scale โ€” future datacentre deployments supporting many users will find storage overheads decreased and small/embedded single-user deployments (such as P2P, on mobile devices or in the browser) will fit much more effectively onto resource-constrained targets.

After upgrading to v0.4.0, Dendrite will run an automatic migration to update your homeserver to the new state storage format. This might take a while on larger databases so please expect some downtime.


We've continued to squeeze further optimisations into the federation and state resolution code, aiming to reduce the amount of CPU burn and memory utilisation. Some of the feedback that we receive most often from those that have been experimenting with the Dendrite betas is around the sudden spikes in resource usage, especially when joined to large rooms.

The bulk of this resource usage comes either from attempting to reconcile missing events or running state resolution in rooms with lots of members, as potentially large state sets of events need to be brought into memory in order to do so. We've introduced some transaction-level caches for dealing with missing auth/prev events to reduce the memory pressure and we've also tweaked the caching around around /get_missing_events to ensure we don't duplicate any state events in memory.

Resource spikes aren't completely eliminated but this should smooth out CPU and memory utilisation significantly. In the case of, which is joined to some 6500 rooms at present, memory utilisation of the Dendrite process typically sits around 1.5GB at present.

State Resolution v2 has also seen further optimisations in the power-level checking, which should reduce CPU usage even more.


Thanks to Half-Shot's perseverance and contributions, we've merged a couple PRs and worked on some further fixes for getting Application Services working correctly in Dendrite. Whilst not entirely feature-complete and with a number of features still to go, enough support is now present to support basic bridging functionality.

We've done quite a bit of preliminary testing with matrix-appservice-irc and have also heard a number of success stories from the community with mautrix-whatsapp and mautrix-telegram. Others may work too โ€” let us know what you find!


A number of bugs in various places (including the roomserver, federation API and media API) which could cause Dendrite to crash have also been fixed. Some of these have been contributed by the community in pull requests, so we extend our thanks to anyone who has submitted a fix to the project.

A special mention also goes to Jakob Varmose Bentzen for reporting a security issue to us around the legacy /v1/register endpoint, where a flaw in the legacy shared secret registration allowed malicious users to create accounts. We've since removed this legacy endpoint and the vulnerability is now fixed.

What's next

There are still a number of missing user-facing features which we will be working on over the coming months, as well as some architectural issues that we will look to address.

A notable area of work involves attempting to remove the dependency on Kafka for polylith deployments. Kafka is very resource-heavy in operation and somewhat limits us to the types of interactions that we can perform between components. It's also very difficult to manage retention correctly, in the interests of not endlessly consuming disk space here either.

As usual, Dendrite is still considered beta so you may not want to rely on it for production systems, although it should be stable enough to experiment with. If you find any bugs or anything that doesn't look right, please let us know:

We're also open to contributions, so don't be afraid to open pull requests. Finally, thanks for your continued support!

โ€” Team Dendrite

This Week in Matrix 2021-07-09

09.07.2021 00:00 โ€” This Week in Matrix โ€” Ben Parsons

Matrix Live ๐ŸŽ™

Dept of Status of Matrix ๐ŸŒก๏ธ

Ansible Community considers Matrix

Gwmngilfen offered:

I'm the Principal Data Scientist for the Ansible Community. We're hoping to switch to Matrix as our primary platform in the near future, and I've just written up my thoughts on why that's a good idea, what the consequences might be, and where we go from here. Find it at

Dept of Spec ๐Ÿ“œ


anoa told us:

Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at

MSC Status

New MSCs:

MSCs with proposed Final Comment Period:

  • No MSCs entered proposed FCP state this week.

MSCs in Final Comment Period:

  • No MSCs are in FCP.

Merged MSCs:

  • No MSCs were merged this week.

Spec Updates

A concrete plan has been drafted for publishing the new spec release, and is currently undergoing execution. This release will include many changes that have built up since the last release (back before the new spec redesign even), as well as the new Matrix Global Version Number scheme. Look forward to it dropping soon!

Otherwise Bruno has been hard at work continuing to push forward the various aggregation MSCs (1 2 3 4). MSC3083 (restricted room memberships) is being updated as part of finalising the new Spaces feature as well as MSC2716 (history import).

As well as lots of new MSCs as listed above. Busy times!


Dept of Servers ๐Ÿข


Conduit is a Matrix homeserver written in Rust

timokoesters said:

The last two weeks I worked on a few very big optimizations. We also almost finished sqlite support for Conduit, which is slower than sled in benchmarks, but has much better RAM usage characteristics.

  • Batch up and cache /sync responses for when clients time out

  • LRU cache for deserialized PDUs

  • More efficient state res by only fetching events it needs

Dendrite / gomatrixserverlib

Neil Alexander said:

Rumours of Dendrite's demise have been greatly exaggerated. Stay tuned for more updates very soon.

We will stay highly tuned!


Synapse is a popular homeserver written in Python.

callahad offered:

Big(int) news! This week processed its 2^31st event, exceeding the range of a PostgreSQL integer column for the first time. This caused a bit of a scramble in the aftermath of last week's spam attack, as we had a few integer columns in our schema which we needed to convert to bigint. Fortunately, we were able to complete the change sufficiently in advance (#8255), and also took the opportunity to audit other columns and sequences in the database which could conceivably overflow. Synapse 1.38, due out next week, will automatically migrate homeservers when they upgrade. We run the migration as a background task, so homeservers should continue functioning as normal throughout, though they may use a bit more disk and memory, especially when rebuilding indexes for the new bigint column.

We're also starting to hone in on our team's goals for this quarter, and it's looking like our primary focus will be on improving room join speeds. Wish us luck!

Lastly, we're overjoyed to announce that @reivilibre, a former intern on the backend team, joined Element this week! We can't wait to see where he helps us take Synapse!

Homeserver Deployment ๐Ÿ“ฅ๏ธ


Ananace said:

This week too gets a Helm Chart update, with element-web having been updated to 1.7.32

Dept of Bridges ๐ŸŒ‰

matrix-puppeteer-line progresses

Fair reported:

matrix-puppeteer-line: A bridge for LINE Messenger based on running LINE's Chrome extension in Puppeteer.

This week was spent on adding proper support for LINE user joins/leaves (though invites/kicks are still a TODO), bug fixes, and ease of deployment. Docker and systemd setups will be ready shortly.

And this bridge should soon be listed on, if it isn't already ๐Ÿ™‚ Thanks madlittlemods (Eric Eastwood) for accepting the PR!


Issue page:

Dept of Clients ๐Ÿ“ฑ

Element Clients

Updates provided by the teams!

Delight team

  • Spaces:
    • iOS development is progressing, some (dev) can see spaces in the left panel
    • Wrapping up work on new settings for restricted rooms, and UI to promote the feature to space admins
    • Maintenance and bug fixing.


  • Improvements to in-call designs on Android
  • Dial pad improvements about to land on web


  • Working on performance testing on large accounts to catch slowdowns and generally improve app performance
  • More under-the-hood TypeScript conversion
  • Message bubbles experiment almost ready to land!
  • Working on universal macOS builds for the desktop app


  • Element Android 1.1.12 is now live on the PlayStore, will be available on F-Droid soon
  • We are polishing the voice message feature
  • Also we are progressing well on the RustSDK integration


SpiritCroc reported:

SchildiChat is a fork of Element that focuses on UI changes such as message bubbles and a unified chat list for both direct messages and groups, which is a more familiar approach to users of other popular instant messengers.

There are two announcements that we can share with you this week:

  • SchildiChat for Android is back in the Google Play Store! Users who have previously installed the release using our own F-Droid repo will be able to update without the need to re-install. All previous ways to install the app will remain available as well.

  • You can now help us translate SchildiChat using Weblate! Note that this only contains SchildiChat-specific translations, we continue to use Element's translations where possible.

Apart from that, we have mainly been focusing on smaller improvements and fixes, while staying up-to-date with new Element releases.

For more information about SchildiChat, feel free to visit our website or check out our source code!

Also, feel free to join our Matrix rooms, which you can find in the new SchildiChat space:


Nheko is a desktop client using Qt and C++17. It supports E2EE and intends to be full featured and nice to look at

Nico ( told us:

Spaces work is making progress. Some rooms can now be previewed. To improve that situation, I wrote an MSC to preview specific rooms. Alternatively we will try to get the previews for the few rooms you aren't joined to from the space summary API, currently we are just fetching the existing state. You can also now join previewed rooms and the design of joining invites was adapted to match it.

red_skyโ˜„๏ธ went through the pain of fixing the Windows builds after we changed our http backend last week. So if you want to try it out, you can test it on Windows. We also replaced the old, boring spinner with an animated Nheko logo. If you see that a lot and think it is Nheko's fault, don't hesitate to open an issue! But in most cases it will probably be your server. Sadly no screenshot of how the spinner looks like, my server is too fast and taking a proper screenshot is too much effort because of that. ;p

We also fixed an issue with updating device lists in the develop version of Nheko. If you were using the nightlies, now is a good time to update! In more E2EE news, symmetric megolm backup fixes the issues I had with the online key backup, so looking forward to implementing that.


Dept of SDKs and Frameworks ๐Ÿงฐ

Opsdroid 0.23

Cadair offered:

The latest release of opsdroid is out with various fixes which can be seen in the changelog. The main point to note for matrix users is that older versions of matrix-nio (the matrix client library used by opsdroid) did not support the synapse change to omit optional fields from sync. Therefore if you are using our docker images you will need to update to 0.23 to get a container with the newest matrix-nio included.

The other change which is relevant to matrix users is that Oleg has added support for version 2 of the Rasa NLU framework, so you can once again do open source, self hosted natural language bots.

Dept of Bots ๐Ÿค–

home-assistant-bot release v2.0.1

Oleg announced:

This release adds a fix for compatibility with Synapse >= v1.38.0

This bot is based on opsdroid bot framework and aims to control actions in home-assistant via Matrix.

Feel free to come by at ๐Ÿ˜‰

Dept of Interesting Projects ๐Ÿ›ฐ๏ธ

Server_Stats Statistical Data

MTRNord offered:

Thanks to Gwmngilfen I touched RStudio and toyed a little with some data as well.

You can find some graphs over at

For the first graph the credit fully goes to Gwmngilfen :)

The second one is in log scale for both axis but essentially the same :)

This is obviously currently very spare but I hope to add more statistics when I understand R lang :) This is in fact my first time doing something with R so my skillset is limited :)

Dept of Guides ๐Ÿงญ

Matrix Bot inside of a Docker Container

krazykirby99999 announced:

Run Matrix Python bots inside of Docker Containers with Simple-Matrix-Bot-Lib and Docker!

This is a guide for isolating and running your Matrix bot within a Docker container. It is also applicable to bots written using other libraries and languages.

New Public Rooms ๐ŸŸ๏ธ

Room of the week

timokoesters told us:

Hi everyone! Did you ever feel lost in the Matrix world? The room directory is big, but it's still hard to find something you like. Or are you a room moderator, but there is not much activity in your room because it doesn't have enough users?

This is why I want to share rooms (or spaces) I find interesting.

This week's space is:

Biggest room: #mathematicsq&

"For questions about any part of maths!"

If you want to suggest a room for this section, tell me in

Final Thoughts ๐Ÿ’ญ

Cadair offered:

In meta twim news, the twim updates bot (which posts in has been upgraded to opsdroid 0.23 and now correctly keeps the formatted body when an event is edited.

Dept of Ping ๐Ÿ“

Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server.

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

That's all I know ๐Ÿ

See you next week, and be sure to stop by with your updates!

This Week in Matrix 2021-07-02

02.07.2021 21:03 โ€” This Week in Matrix โ€” Ben Parsons
Last update: 02.07.2021 19:28

Matrix Live ๐ŸŽ™

Dept of Status of Matrix ๐ŸŒก๏ธ

We missed it at the time, but wanted to share in TWIM. Terence Eden, noted UK technologist, shared a thorough, compelling argument for the UK Government to use Matrix as a foundation for the digital workplace.

This is a long read, but a detailed argument. Also please note that this is was produced for the purpose of an MSc course of study, it was not commissioned for any other purpose, as the preamble makes clear.

Next, a high billing for Beeper this week, who have been working hard and getting product out!

Beeper update

Tulir reported:

It's been a month since our last update. A lot of the work since then has been on making everything more reliable, but we've also added new features to our clients and started making some new bridges.


  • Added thread UI for Slack-bridged rooms. Internally they're just replies like before, but the client will intelligently collapse replies in Slack rooms into threads.

  • Merged upstream Element additions like voice messages.


  • Released Beeper iOS to Testflight.


  • Added grouping rooms by chat network based on the m.bridge state event. The UI is similar to spaces, but they're not actual Matrix spaces (yet).

  • Added support for Android 11's "conversation" notifications.


  • Android Messages is turning out difficult to reverse-engineer to a sufficiently reliable level, so we're building a new SMS bridge into our Android app. It'll also be available as a standalone open-source app, which already exists at (but doesn't have any setup instructions yet).

  • We've funded development of a LinkedIn bridge. sumner will post a more detailed update about that.

We're hiring React, iOS, Android and SRE/Devops engineers. If you're interested, check out or DM Eric Migicovsky.


Dept of Spec ๐Ÿ“œ

MSC state changes:

Bruno has been working on aggregations as part of his work for Hydrogen. He reported:

I've been cleaning up the relations MSCs, finding a balance between documenting the current state and not losing track of community concerns. I've started with MSC 2674 which is the very basic format of relations, and will move on to annotations/reactions (MSC 2677) next week.

Spec progress graph

Dept of Servers ๐Ÿข


Synapse is a popular homeserver written in Python.

callahad announced:

We're pleased to announce the release of Synapse 1.37.1 this week, which includes mitigations for the recent distributed spam attack across the public Matrix network. We advise upgrading as soon as possible.

Otherwise, Synapse 1.37 highlights include:

...and a bunch of smaller bug fixes and performance improvements.

Check out the blog post for more.

Homeserver Deployment ๐Ÿ“ฅ๏ธ


Ananace offered:

Got another week of Helm Chart updates, with the Synapse chart getting a bunch of worker improvements and additional configurability, as well as being updated to first 1.37.0 and then 1.37.1

Dept of Bridges ๐ŸŒ‰

LinkedIn <-> Matrix Bridge

sumner reported:

I'm excited to announce that I started working on a new bridge for bringing LinkedIn messages to Matrix! It's currently in the early stages of development and not production-ready. The current feature set includes: backfill from LinkedIn, user name and profile picture sync, message sending from Matrix -> LinkedIn, and real-time message puppetting from LinkedIn -> Matrix. There's much more to come, and you can join for updates. Development is being funded by Beeper, and is being designed with integration into Beeper as it's primary goal. However, the bridge is open source (Apache 2.0) and will be available to self-host. The source code is here:

Great work from Sumner! Glad to see people have the option to bridge their LinkedIn messages!

matrix-puppeteer-line update

Fair reported:

matrix-puppeteer-line: A bridge for LINE Messenger based on running LINE's Chrome extension in Puppeteer.

Better LINE->Matrix read receipt bridging is now supported in the testing branch! The bridge now checks all LINE chats (not just the most recently-used one) to see if messages you sent have been read (in LINE). This works by cycling through all LINE chats where the final message is posted by you and doesn't have a "Read" marker on it yet (or for multi-user chats, if your last message hasn't been read by everyone in the room).

With that, I'll consider the bridge to be in Early Beta! ๐ŸŽ‰ I'm now testing the bridge for myself to iron out a few kinks, and am preparing a PR to the webpage to have this listed on

Discussion: Issue page:

Matrix Adapter for WebThings 0.4.0

Christian told us:

This addon for the WebThings gateway lets you send Matrix messages when your IoT fridge is empty โ€“ or whatever you have connected to your gateway.

The update fixes predefined messages getting sent to the default room and is the first to be tested against gateway version 1.0.0. or in the addon list of your WebThings gateway

Dept of Clients ๐Ÿ“ฑ


Carl Schwan announced:

This week, NeoChat gained support for a Global Menu on Plasma and macOS. Aside from that, we fixed a few crashes.

But the biggest news of the week is that we will get funding from NLNet to implement E2EE support in Quotient and NeoChat as part of their grants to improve the internet. We will report on our progress on that front here!

This is terrific news, big thanks to NLNet for making this choice!


FluffyChat is the cutest cross-platform matrix client. It is available for Android, iOS, Web and Desktop.

krille said:

FluffyChat 0.33.0 has been released.

Just a more minor bugfixing release with some design changes in the settings, updated missing translations and for rebuilding the arm64 Linux Flatpak.


  • redesigned settings

  • Updated translations - thanks to all translators

  • display progress bar in first sync

  • changed Linux window default size

  • update some dependencies


  • Favicon on web

  • Database not storing files correctly

  • Linux builds for arm64

  • a lot of minor bugs


Nheko is a desktop client using Qt and C++17. It supports E2EE and intends to be full featured and nice to look at

Nico ( offered:

Hello World! I am here to bring you Nheko news!

We merged the Spaces branch, which means Nheko master can now show some spaces. Peeking unjoined rooms, nesting spaces and creating them should be coming soon. We are also looking into how to fit knocking into the UI (we already rendered incoming knocks in the timeline for a while).

You can also now edit still pending messages, which should help if your server is slow and you notice a typo. The edit will then get queued and be sent as soon as the server acknowledges they received the original message. Apart from that there have been some improvements to the readability of the room list and some other UI elements.

Last but not least, we switched out our entire http backend from Boost to Curl. For that I wrote a simple wrapper around Curl. This fixes about 10 issues around connection shutdown, brings proxy support, http/2 and http/3 support and in general makes Nheko crash less and reduces latency a LOT! This will obviously cause some pain for packagers, but I hope it isn't too bad. Some of the issues this fixes only had 2 digits in our bugtracker and one was even filed by benpa!

Have a nice weekend everyone! โ™ฅ



Alexandre Franke told us:

Chris tweaked the UI in various places. Itโ€™s a lot of small details that together make for a smoother experience. I encourage you to read the details in the description of !782. This is the only MR that landed since last week, but our people have been hard at work nonetheless. Kai blogged about his journey working on the search bar of doom and Alejandro shared his own struggle. In the meantime, Julianโ€™s work has mostly happened upstream in matrix-rust-sdk.

Element Clients

Updates sent by the teams

Delight team

  • Spaces:
    • Research: Weโ€™ve been reaching out to people to walk us through how they use Spaces now and what theyโ€™d like to see different to help us learn and iterate;
    • Restricted room access: Some good progress towards shipping improved team spaces


  • v1.7.32-rc.1 is on in advance of release on Monday - please test!
  • Some major progress on conversion to TypeScript, finding some bugs along the way. The main source of the element-desktop project is now fully converted to TypeScript!
  • A styled player component for the audio messages feature, available in the labs section.



  • We are actively implementing the highly expected voice message feature!
  • A release candidate v1.1.12 will be available during the week-end
  • We are focusing to fix some crashes, to improve the stability of the application

Vocie messages!


tusooa reported:

kazv is a matrix client based on libkazv.

Talk to us on .


  1. fixed a thread-safety issue that caused crashes.

  2. We now have a new developer . She implemented a login failure prompt for kazv.

You can get the current AppImage build at .

Dept of SDKs and Frameworks ๐Ÿงฐ

matrix-bot-sdk v0.5.19

TravisR announced:

v0.5.19 of the matrix-bot-sdk is out now with fixed power level checking (with an added utility function), improved default error logging, and a typo fix in reply creation. Check it out, and visit for help & support.

Dept of Ops ๐Ÿ› 

Matrix Navigator 0.1.2

Christian told us:

It's an alpha-stage webapp for developers to replace curl for room state administration.

This week I added features for better member management, including kick, ban and unban.

Dept of Services ๐Ÿš€

GoMatrixHosting v0.5.1 ๐Ÿš€

Michael told us:

Exciting new update, we can now wireguard an on-premises server from just about anywhere and make it work with the AWX system. This is useful when your server doesn't have a static or public IP address, or when some other networking issue prevents you from running a Matrix service on it.

Follow of on GitLab:

Or come say hello on Matrix:

* Add '00 - Create Wireguard Server' template for AWX admin to provision Wireguard servers that on-premises servers can use to connect.

* Subscription involved can view an additional '0 - {{ subscription_id }} - Provision Wireguard Server' template.
* Add /docs/ guide.

* Add onboarding script for Windows 10 users.
* Raise maximum download size to 200MB.

Dept of Bots ๐Ÿค–


TravisR offered:

Mjolnir is a moderation bot for communities on Matrix. It helps with a lot of the actions covered by the moderation guide, including capabilities to apply bans from other trusted communities. It's still a bit terse in its documentation, but if you're looking for a featureful moderation bot then it's worth a go.

In related news, Mjolnir v0.1.18 is out with a couple quality of life fixes - if you've been bothered by the log spam, it's now fixed :)

Dept of Guides ๐Ÿงญ

Matrix Limits

Ryan said:

I started a tiny repo to collect various limits and related factoids about the Matrix specification and implementations. I hope that distilling and summarising such things at glance will make it easier to see what is and is not possible.

If you know of more that should be listed, please contribute! ๐Ÿ™‚

Self hosting your own Matrix server on a Raspberry Pi

Peter Roberts announced: of has written a guide on getting started with Synapse on a Raspberry Pi using Docker Compose. You can read it here.

Public Rooms News ๐ŸŸ๏ธ

Matrix Science Reading Group

Florian said:

Together with J. Ryan Stinnett, I created the ๐Ÿ”– for exchange of and on scientific papers, books and related resources on all things Matrix: Topics ranging from peer-to-peer broadcast overlay networks over conflict-free replicated data types to end-to-end encryption. Investigating security, performance, deployability, or whatever else is interesting, by methods from observation over simulation to formal verification. ๐ŸŽ“๏ธ Please join if you want to read about papers that might not be Matrix-related enough to make it into TWIM, or want to engage in the discussion. ๐Ÿ˜Š The resulting papers are collected at:

German Element translation feedback

Libexus announced:

Hallo deutschsprachige Matrix-Community! ist ein Raum fรผr Feedback zur deutschsprachigen รœbersetzung aller Element-Clients.

Hast du einen Fehler gefunden, ist etwas unklar oder hast du ein Anliegen an uns? Dann schreibe es gerne hier hinein!

Jederzeit willkommen sind natรผrlich auch neue รœbersetzerinnen und รœbersetzer. Joint dazu einfach, und lest euch den Translation Guide durch.

Hello German-speaking Matrix community! is a room for feedback about the German translation of Element.

Have you found a mistake, is something unclear or do you have a suggestion? Please write it there!

Also, we are always happy about new translators (for all languages!). Just join and have a look at the translation guide on how to get started!

Room of the week

timokoesters told us:

Hi everyone! Did you ever feel lost in the Matrix world? The room directory is big, but it's still hard to find something you like. Or are you a room moderator, but there is not much activity in your room because it doesn't have enough users?

This is why I want to share rooms (or spaces) I find interesting.

This week's room is:

"A public space for Free/Open Source Software maintainers to swap notes and discuss their craft. Inspired by, all maintainers welcome!"

If you want to suggest a room for this section, tell me in

Dept of Ping ๐Ÿ“

Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server.

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

That's all I know ๐Ÿ

See you next week, and be sure to stop by with your updates!

Security update: Synapse 1.37.1 released

30.06.2021 00:00 โ€” Releases โ€” Matthew Hodgson

Hi all,

Over the last few days we've seen a distributed spam attack across the public Matrix network, where large numbers of spambots have been registered across servers with open registration and then used to flood abusive traffic into rooms such as Matrix HQ.

The spam itself has been handled by temporarily banning the abused servers. However, on Monday and Tuesday the volume of traffic triggered performance problems for the homeservers participating in targeted rooms (e.g. memory explosions, or very delayed federation). This was due to a combination of factors, but one of the most important ones was Synapse issue #9490: that one busy room could cause head-of-line blocking, starving your server from processing events in other rooms, causing all traffic to fall behind.

We're happy to say that Synapse 1.37.1 fixes this and we now process inbound federation traffic asynchronously, ensuring that one busy room won't impact others. First impressions are that this has significantly improved federation performance and end-to-end encryption stability โ€” for instance, new E2EE keys from remote users for a given conversation should arrive immediately rather than being blocked behind other traffic.

Please upgrade to Synapse 1.37.1 as soon as possible, in order to increase resilience to any other traffic spikes.

Also, we highly recommend that you disable open registration or, if you keep it enabled, use SSO or require email validation to avoid abusive signups. Empirically adding a CAPTCHA is not enough. Otherwise you may find your server blocked all over the place if it is hosting spambots.

Finally, if your server has open registration, PLEASE check whether spambots have been registered on your server, and deactivate them. Once deactivated, you will need to contact ab[email protected] to request that blocks on your server are removed.

Your best bet for spotting and neutralising dormant spambots is to review signups on your homeserver over the past 3-5 days and deactivate suspicious users. We do not recommend relying solely on lists of suspicious IP addresses for this task, as the distributed nature of the attack means any such list is likely to be incomplete or include shared proxies which may also catch legitimate users.

To ease review, we're working on an auditing script in #10290; feedback on whether this is useful would be appreciated. Problematic accounts can then be dealt with using the Deactivate Account Admin API.

Meanwhile, over to Dan for the Synapse 1.37 release notes.

Synapse 1.37 Release Announcement

Synapse 1.37 is now available!

**Note: ** The legacy APIs for Spam Checker extension modules are now considered deprecated and targeted for removal in August. Please see the module docs for information on updating.

This release also removes Synapse's built-in support for the obsolete ACMEv1 protocol for automatically obtaining TLS certificates. Server administrators should place Synapse behind a reverse proxy for TLS termination, or switch to a standalone ACMEv2 client like certbot.

Knock, knock?

After nearly 18 months and 129 commits, Synapse now includes support for MSC2403: Add "knock" feature and Room Version 7! This feature allows users to directly request admittance to private rooms, without having to track down an invitation out-of-band. One caveat: Though the server-side foundation is there, knocking is not yet implemented in clients.

A Unified Interface for Extension Modules

Third party modules can customize Synapse's behavior, implementing things like bespoke media storage providers or user event filters. However, Synapse previously lacked a unified means of enumerating and configuring third-party modules. That changes with Synapse 1.37, which introduces a new, generic interface for extensions.

This new interface consolidates configuration into one place, allowing for more flexibility and granularity by explicitly registering callbacks with specific hooks. You can learn more about the new module API in the docs linked above, or in Matrix Live S6E29, due out this Friday, July 2nd.

Safer Reauthentication

User-interactive authentication ("UIA") is required for potentially dangerous actions like removing devices or uploading cross-signing keys. However, Synapse can optionally be configured to provide a brief grace period such that users are not prompted to re-authenticate on actions taken shortly after logging in or otherwise authenticating.

This improves user experience, but also creates risks for clients which rely on UIA as a guard against actions like account deactivation. Synapse 1.37 protects users by exempting especially risky actions from the grace period. See #10184 for details.

Smaller Improvements

We've landed a number of smaller improvements which, together, make Synapse more responsive and reliable. We now:

  • More efficiently respond to key requests, preventing excessive load (#10221, #10144)
  • Render docs for each vX.Y Synapse release, starting with v1.37 (#10198)
  • Ensure that log entries from failures during early startup are not lost (#10191)
  • Have a notion of database schema "compatibility versions", allowing for more graceful upgrades and downgrades of Synapse (docs)

We've also resolved two bugs which could cause sync requests to immediately return with empty payloads (#8518), producing a tight loop of repeated network requests.

Everything Else

Lastly, we've merged an experimental implementation of MSC2716: Incrementally importing history into existing rooms (#9247) as part of Element's work to fully integrate Gitter into Matrix.

These are just the highlights; please see the Upgrade Information and Release Notes for a complete list of changes in this release.

Synapse is a Free and Open Source Software project, and we'd like to extend our thanks to everyone who contributed to this release, including aaronraimist, Bubu, dklimpel, jkanefendt, lukaslihotzki, mikure, and Sorunome,

This Week in Matrix 2021-06-25

25.06.2021 00:00 โ€” This Week in Matrix โ€” Ben Parsons

Matrix Live ๐ŸŽ™

  • Valere presents the latest Spaces UX
  • Neil Alexander shows off P2P progress
  • ChristianP shows Matrix Navigator
  • Eric Eastwood (Gitter fellow!) shows off MSC2716 (message history batches)
  • Rich vdH presents Jaeger for Synapse profiling
  • Bruno presents reactions in Hydrogen

Dept of Status of Matrix ๐ŸŒก๏ธ

Room of the week

timokoesters said:

Hi everyone! Did you ever feel lost in the Matrix world? The room directory is big, but it's still hard to find something you like. Or are you a room moderator, but there is not much activity in your room because it doesn't have enough users?

This is why I want to share rooms (or spaces) I find interesting.

This week's space is: RPG

Biggest room: #D&

"Casual chat about Dungeons & Dragons, tabletop RPG, OSR, DM tips, player stories, world building, and more."

If you want to suggest a room for this section, tell me in

Dept of Spec ๐Ÿ“œ


anoa told us:

Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at

MSC Status

Merged MSCs:

MSCs in Final Comment Period:

  • No MSCs are in FCP.

New MSCs:

Spec Updates

Spaces work continues with MSC3083 (Restricted room memberships), which will include a new room version due to the new join_rule of `restricted. On the other side of things, MSC3245 (voice messages) and by extension extensible events, is moving as the implementation work is pushed forward. Lots of activity on MSC3215 (improved moderation tooling) as well which will no doubt prove to be invaluable as the Matrix network continues to grow.


Dept of Servers ๐Ÿข


Conduit is a Matrix homeserver written in Rust

timokoesters reported:

After some more work on swappable database backends, I worked on a few small features:

  • User directory improvements (show remote users and appservice puppets)

  • /state endpoint

  • /event_auth endpoint

  • Filter our room directory based on the search term

  • /search over multiple rooms


Synapse is a popular homeserver written in Python.

anoa said:

Knock, knock TWIM! It's a new week, and I'm filling in for Dan today to bring you an update on Synapse's latest progress!

Hot off the heels of Synapse 1.36.0โ€™s release last week, weโ€™ve put out 1.37.0rc1! It includes the long-awaited โ€œroom knockingโ€ feature (note that no clients currently support knocking), a completely reworked pluggable modules interface and experimental support for backfilling history into rooms. With knocking support in, this means Synapse now has support for room v7!

Among those exciting updates, we also have the usual churn of bug fixes and improvements across the board. Many updates to the documentation as well as we lean into using the new Synapse documentation site more and more. Please help us test the RC if you can!

Homeserver Deployment ๐Ÿ“ฅ๏ธ


Ananace offered:

This week too sees some Kubernetes chart updates, with element-web being updated to 1.7.31 and matrix-synapse getting some fixes for envvars and mounts, as well as some improvements to the ingress support.


Mamie offered:

YunoHost is an operating system aiming for the simplest administration of a server, and therefore democratize self-hosting.

Synapse integration had been updated to 1.34.0 (1.35.1 available in branch testing)

Element Web integration had been updated to 1.7.28 (1.7.29 available in branch testing)

Dept of Bridges ๐ŸŒ‰


Eric Eastwood offered:

It has been several months since we last updated you on MSC2716 for backfilling historical messages into existing rooms but we made some big progress this week and merged an experimental Synapse implementation taking us one step closer to importing the massive archive of messages on Gitter over to Matrix! This iteration will only make the historical messages visible on the local homeserver but we have plans to make them federate in the next. It's still early days on this before we can actually use it on Gitter. Here is a proof of concept to get your juices flowing:


Dept of Clients ๐Ÿ“ฑ


A minimal Matrix chat client, focused on performance, offline functionality, and broad browser support.

Bruno said:

Released Hydrogen 0.2.0 with:

  • support for receiving and sending reactions โค๐Ÿ‘๐Ÿš€
  • adds a right panel with basic room information, thanks to @MidhunSureshR! Watch this space in the near future for more functionality soon.

Loving Hydrogen right now. It's fast and works great! See Bruno present reactions as one of the Matrix Live demos (scroll up)


Carl Schwan announced:

In terms of code, this week we didn't get much activity. The only noteworthy news is that we can now send spoilers, and use two new commands: /tableflip and /unflip thanks to Smitty van Bodegom.

Aside from that, we had 2 productive BoFs during Akademy 2021. The first one was about creating a library with shared chat visual components for KDE's chat apps: NeoChat for Matrix, Tok for Telegram and Kaidan for XMPP, KDE Connect and Spacebar for SMS, ... The second BoF was more about NeoChat and Quotient and we discussed how to move forwards with some problems (e.g. non-hacky text input auto-completion) but also the roadmap around E2EE, Spaces and Widgets support. Speaking about E2EE, we will have some very good news to announce next week, stay tuned!

/me only learned about /tableflip and /unflip this today... and looking forward to this E2EE news!


Alexandre Franke announced:

In the past couple of weeks, Alejandro and Kai started the coding period of their GSoC internship and explained on their blogs what they will be working on. Their projects are respectively to add support for multiple accounts, and to bring Fractal Next to feature parity with current stable. Read more details on their blogs, and subscribe to them to keep informed as they go!

Julian managed to land the โ€œExploreโ€ view, our room directory. There may be some changes down the road, but it looks good for now:


Newcomer Giuseppe De Palma removed bashisms from our git hook because they were preventing him from contributing. They then went on to tweak the history style to remove the grey background around it. They also got rid of a papercut from the login form: before his intervention, users needed to provide the full homeserver URL with the http:// or https:// scheme prefix. It will now default to HTTPS.

We also did some housekeeping work that should improve the experience for people joining us on the Fractal Next fun. After being away for a while, Christopher Davis came back with a patch to add a couple more build related directories to our .gitignore. Julian cleaned up the pseudo-milestone description that we had in the README, now that we have a proper Gitlab milestone. And finally, I added a warning on the login screen to better reflect on the Work In Progress state of the branch.

Element Clients

Updates from the teams! Android will return next week.

Delight team

  • Spaces:
    • Drag and drop for reordering Spaces is now live on Android! And testable on develop for Web
    • Weโ€™ve also added labs flags to Web & Android to test a few different things, in particular
      • Toggling โ€˜Homeโ€™ to show all rooms, or only rooms which donโ€™t belong to Spaces
      • Toggling to not show People in Spaces
    • Please try them out! After living with a different config for a few days, weโ€™d love to hear your feedback!


  • 1.7.31 released on Monday
  • Nightly builds of Element Desktop optimised for Apple silicon are now available for testing! Please give it a try and report any issues.
  • Added to room directory on develop, staging, and app. It will appear in desktop builds as well next time they update.
  • On develop
    • Various CI tweaks and performance improvements
  • In flight
    • Adding large account performance tests


  • 1.4.2 released on Monday. 1.4.3 with the fix on wellknown on Thursday
  • Fix a bug where the wellknown was no more fetched
  • Device dehydration is available in the SDK
  • Still good progress on voice messages


kitsune offered:

0.0.95 RC is out, available from the usual place at GitHub, and also as Flatpak from Flathub. The usual stabilisaton/bug fixing work, no new features compared to betas. This version is considerably better, and more stable, than - packagers are welcome to push it as if it were the final release. Translators, please help to complete more languages: Polish is at 90%, Spanish almost 80%, and French just below 60% - you can make a difference!

Dept of Encryption ๐Ÿ”

New paper: โ€œKey Agreement for Decentralized Secure Group Messaging with Strong Security Guaranteesโ€

Florian offered:

Here is a scientific paper for all interested in decentralized end-to-end encryption cryptography protocols, like Matrix' Megolm, or the MLS future of Matrix: The preprint โ€œKey Agreement for Decentralized Secure Group Messaging with Strong Security Guaranteesโ€ by Weidner, Kleppmann et al., which will appear in the ACM CCS 2021 Conference, surveys existing centralized and decentralized end-to-end cryptography protocols, Olm/Megolm (labeled as โ€œMatrixโ€) among them, and discusses why the Messaging Layer Security (MLS) IETF draft has its problems with decentralization. Following that, they come up with their own decentralized protocol, including a security and performance analysis. They improve asymptotic complexity when compared to Olm/Megolm, and the assumptions on the underlying communication layer are easily fulfilled by Matrix. They also discuss that the very good asympotic complexity of MLS cannot be reached for a decentralized end-to-end cryptography protocol.

Dept of SDKs and Frameworks ๐Ÿงฐ


kitsune reported:

Last week's news actually, but libQuotient master branch can built with Qt 6 now, laying ground for the GSoC works on PyQuotient - Python bindings for libQuotient. The library has also been updated to follow the latest CS API specification, which means basic low-level support for knocking, with higher-level library API for it coming later.

๐Ÿง™ Polyjuice Util

Polyjuice Client is a Matrix library for Elixir

uhoreg said:

Polyjuice Util is a library of Matrix functions for Elixir that can be used for both client-side and server-side applications. Polyjuice Util 0.2.0 has been released, which includes functions for common errors, handling identifiers, and for checking room permissions. Thanks to Nico for his contributions to this release. This release also contains some backward-incompatible changes. See the changelog for more information.

Polyjuice Client 0.4.1 has also been released, which uses the new Polyjuice Util release, and adds support for the whoami endpoint (thanks to multiprise).

Dept of Ops ๐Ÿ› 

synadm 0.30

jojo said:

Hello dear Synapse Admins, synadm v0.30 is out. lt seems I was in "story telling mode" already when I wrote the release notes yesterday. That should perfectly suit a TWIM article as well ๐Ÿ™‚ So there you go, copy/pasted from with love:


synadm finally got some nicely rendered documentation pages hosted at

"Login as a user" admin API support:

New subcommand matrixsupporting execution of regular Matrix commands. As a first shot a command to issue any Matrix API call has been implemented:

  • synadm matrix raw endpoint/url -m post -f data.json

  • synadm matrix raw endpoint/url -m put -d '{"key1": "value1"}' --prompt

  • The new command's docs

Note that this is meant to be a convenience function in case a Synapse homeserver admin wants to quickly help users e.g set specific settings available via regular Matrix calls and not the Synapse admin API directly. Also note that it is not meant to replace the awesome Matrix CLI tools that are already out there. matrix-commander, matrixcli to mention just a few.

The second command below matrix is:

It implements a plain login on a Matrix server using username and password. It can even be used to retrieve a token for an admin user, e.g helpful for setting up fresh synadm installations. Read about it here


The README has been updated to point to the nicely rendered docs recently published at


Update via PyPI or git as described in the update chapter:

Thanks to the friendly people in for reviewing, testing, discussing functionality and giving advice. And for this release, a special thanks to

Matrix Navigator v0.1.1

Christian said:

Matrix Navigator aims to be a replacement for curl when querying and mutating room states, including permissions.

  • Plenty of fixes (reminder, this is still alpha software)

  • Allows to join, leave rooms and inviting users.

  • New wide-screen layout

  • Errors are now shown in input fields or alerts.

Code and roadmap:

Dept of Services ๐Ÿš€

Thoughts on Matrix account ownership

Thib told us:

with the change of policy we deployed on GNOME's Matrix instance, it occurred to me that we had overlooked an important aspect in our relationship with Matrix: do we own our Matrix account? And the answer is... maybe! In this post I cover the differences between personal account, organisation-owned account, the importance of segregating activities on Matrix... and why this may change with Portable Identities in the future

Dept of Jobs ๐Ÿ’ฐ๏ธ

Tchap are hiring!

Thib reported:

the French government deployed Tchap, an instant messaging based on Matrix. They are looking for tech and processes oriented people to improve the service. (๐Ÿ‡ซ๐Ÿ‡ท) (๐Ÿ‡ซ๐Ÿ‡ท)

Final Thoughts ๐Ÿ’ญ

Andy reported:

I know this isn't TWIM-worthy, but I figured people in this room would find it interesting: yesterday there was a very popular post on reddit about how we don't appreciate email enough, and in the comments there were some mentions of matrix as the counterpart for messaging:

Actually I think this is very interesting. Worth taking a read to understand how people not already using Matrix might see the world.

Dept of Ping ๐Ÿ“

Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server.

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

That's all I know ๐Ÿ

See you next week, and be sure to stop by with your updates!

This Week in Matrix 2021-06-18

18.06.2021 00:00 โ€” This Week in Matrix โ€” Ben Parsons

Matrix Live ๐ŸŽ™

Talking to Half-Shot about Libera Chat IRC bridging.

Dept of Status of Matrix ๐ŸŒก๏ธ

GNOME community loves Matrix

Thib reported:

The GNOME community loves Matrix and wants it to grow! That's why it's closing registrations on its instance. What? Yes, we want both to provide the best experience for our community and to be a good citizen in the Matrix universe.

Dept of Spec ๐Ÿ“œ

anoa said:

Here's your weekly spec update! The heart of Matrix is the specification - and this is modified by Matrix Spec Change (MSC) proposals. Learn more about how the process works at

MSC Status

Closed MSCs:

Merged MSCs:

MSCs in Final Comment Period:

New MSCs:

Spec Updates

Feedback from the Spec Core Team has landed on MSC3244: Room version capabilities, MSC3083: Restricted room membership and a myriad of others. Travis has stormed in with MSC3245: Voice messages via Extensible Events and MSC3246: Audio event/waveform representation in extensible events and as a result MSC1767: Extensible Events has gotten some love.

Finally MSC3173: Expose stripped state events to potential joiners reached FCP this week, which is a step towards informing clients about the state of a room before they attempt to join or knock on it, which allows for nicer client UX when deciding whether you want to join a room or not.


Dept of Servers ๐Ÿข


callahad offered:

This week's big news is the release of Synapse 1.36 which completely eliminates memory spikes when joining rooms! I'll let the "Joining Matrix HQ" graph speak for itself:


We also fixed a few bugs with presence (especially over federation or on a worker process), and would strongly encourage you to upgrade.

We'll spend the next few weeks on smaller changes as we prepare our Q3 goals, but we look forward to sharing those with you when we have them.

Happy weekend, TWiM!

Happy weekend to you too! Let's upgrade to 1.36 this weekend!


f0x said:

Actively deployed to's Synapse now, and running very smoothly. Happy graphs show 91% of requests are handled without Synapse involved.

Also demonstrated the very seamless drop-in enable and disable, just changing the reverse proxy url back and forth from Synapse, and with this you could cautiously try this out for your own server, but stay in touch with


Got an update after realizing that's horrible but technically correct server discovery didn't get handled correctly yet

Homeserver Deployment ๐Ÿ“ฅ๏ธ


Ananace told us:

This week sees another installation of the regular Kubernetes updates, bumping the Synapse chart and image to 1.36.0

Dept of Bridges ๐ŸŒ‰


hifi offered:

Heisenbridge roundup!

Heisenbridge is a bouncer-style Matrix IRC bridge.

  • Plumbing private/invite-only rooms is possible

  • IRC quit messages are visible as leave reasons

  • Nick changes are now displayed in leave reason instead of a notice

  • Prioritized Matrix->IRC queue for improved responsiveness while sending out a lot of messages

  • Improved AUTOCMD with multi-command support

  • Improved ZNC support with display of external messages by yourself

  • Improved plumbing message formatting: ZWSP in sender names, smarter truncation

  • IRC user displayname cases update if PRIVMSG source differs from current

  • New rooms respect cases of IRC nicks and channels

  • Conduit related fixes, thanks Peetz0r!

  • Channels with keys on IRCnet now rejoin correctly

  • Finally 100% working identd so it works on all tested networks

  • Cleaned up SASL support which makes server messages during authentication visible

  • Proper cleanup when leaving Heisenbridge rooms

  • Tiny bugfixes everywhere!

Currently working towards 1.0 release so mostly bug hunting and improving existing code and features.

Call for mutual help! The plumb feature needs more testing on busy IRC channels. If you need to plumb public Matrix rooms and IRC channels on any IRC network that does not have a public bridge available or just want to use a relaybot on IRC side for some reason hit me up on and we can setup a test plumb, free of charge! Only requirements are that I can lurk around to monitor how it works and there's nothing offensive on-topic.

In other news @warthog9 submitted an article to how to use ZNC and Heisenbridge together to keep using your existing IRC bouncer with Heisenbridge as a client for it. Pretty cool stuff!


matrix-appservice-irc weights in at release 0.27.0

Half-Shot told us:

Hola everyone! Today we're releasing the latest in bridge greatness, matrix-appservice-irc 0.27.0. This release contains the bulk of our work done for As always, thanks to the community for testing, writing up issues and creating PRs so that we can build better bridges to our friends on other networks.

The highlights are:

  • Username/password SASL authentication support. The bridge now lets you set a !username.

  • Bridge operators can now choose to block messages in the I->M direction while Matrix users are not joined to IRC as a privacy preservation technique.

  • You can now configure the bridge to publish rooms to the public room directory (rather than the appservice directory). The bridge can now also use the whole alias namespace (e.g. -> #foo).

  • Numerous bug fixes and quality of life fixes!

This is now live on, and will be live on the other bridges very soon!

Watch Matrix Live for more from Half-Shot.


Fair reported:

matrix-puppeteer-line: A bridge for LINE Messenger based on running LINE's Chrome extension in Puppeteer.

Even more read receipt improvements are here! In summary, with the magic of MSC2409, the bridge shouldn't ever "view" a LINE chat on your behalf in order to sync a message (which would send a read receipt to your chat contacts, even though you didn't read the chat yourself). For LINE messages that require viewing its chat in order to be bridged, like images/stickers (to get the image) and messages in multi-user chats (to know who sent them), the bridge instead sends a "placeholder" message that gets updated with the real LINE message content when you view the placeholder. That way, the bridge will only view a LINE chat when you view its Matrix portal.

A few stability fixes have been pushed as well. Namely, sync should be less likely to accidentally skip chats.

Only one final read receipt improvement remains, for LINE->Matrix read receipt bridging (which I mentioned last week): to make the bridge check all LINE chats (not just the most recently-used one) to see if messages you sent have been read (in LINE). This will work by cycling through all LINE chats where the final message is posted by you and doesn't have a "Read" marker on it yet.

Once that is taken care of, I'll consider the bridge to be in beta! ๐ŸŽ‰


Issue page:

Dept of Clients ๐Ÿ“ฑ

Element Clients

Updates from the teams

Delight team

  • Spaces:
    • The highly requested drag & drop for reordering of Spaces has entered RC, expect it soon
    • New settings to setup aliases for spaces will also land in next release
    • Ongoing work to improve team spaces with restricted rooms.
    • We have a plan for iOS


  • 1.7.31 RC on staging
    • Various tweaks and improvements to the Spaces beta experience
    • Added room intro warning when E2EE is not enabled
    • Improved message forwarding UI
    • Improved timeline reflow and room list filter performance
  • On develop
  • In flight
    • Continuing to improve application performance
    • Working on Apple silicon desktop builds
    • Working on translation mismatch errors
    • Starting work on message bubbles, building on existing work from the community
    • Fuzzy matching for the room list filter in progress
  • Coming soon
    • Voice messages: we're in the testing stages and looking for feedback before they go live. Give it a go and let us know!


  • The new side menu and the new UI to join a room by alias are on develop.
  • The security settings screen has been updated to match the UX of element-web. The iOS app now uses the same wording for โ€œSecurity Phraseโ€ and โ€œSecurity Keyโ€
  • Device dehydration now works in the SDK. We need to polish the work before merging the PR
  • Voice message is still progressing well. We need to figure out how we will deal with the ogg format on iOS. We also need to add a cache to improve performance in the audio (and encryption) processing


  • Theme changes are now merged on develop and will be included in release 1.1.10. All the themes and styles have been moved to a dedicated gradle module. This is the first step to be able to develop new app features using dedicated modules. Other steps are required for us to be able to do that though (create a core module, etc.).
  • All the PlayStore descriptions have been pushed to the PlayStore using Fastlane, should be live soon. F-Droid already has the up to date translations for the store assets. Thanks to all the contributors on Weblate!
  • Release 1.1.10 will be prepared today. Expect it to be in production next week if everything is fine.


Carl Schwan said:

Last week was another busy week in NeoChat. Carl made the room list sidebar resizable and improved the responsive design of the settings pages.

Janet Blackquill implemented custom emojis using the im.ponies.user_emotes extension. For now auto-completion works, the custom emojis will be displayed in the emoji picker and lastly there is also an UI to add new emojis. We plan to implement more of the im.ponies MSC (custom stickers, sticker pack) soon :)



Smitty van Bodegom implemented spoilers and added /j and /leave alias for /join and /part. He also fixed the spellchecker trying to spellcheck commands like /rainbowme.

Oh and finally NeoChat was also featured on last week's "This Week in Linux" podcast: Don't forget to follow us on Twitter @NeoChatKDE or Mastodon @[email protected], to get your latest news about NeoChat.

Akademy is also happening this weekend and next week. KDE is using Matrix and BigBlueButton for the conference. There will be a lot of talk, training and bofs. We have a bof the 22th June at 16th. It's virtual and everyone is welcome to join and discuss with us NeoChat development.


FluffyChat is the cutest cross-platform matrix client. It is available for Android, iOS, Web and Desktop.

krille offered:

FluffyChat 0.32.0 is out now ๐Ÿ’ช and targets improved stability and a new onboarding flow where single sign on is now the more prominent way to get new users into the app.

This release also introduces a complete rewritten database under the hood based on the key value store Hive instead of sqlite.

This should improve the overall stability and the performance of the web version.


[pioneer] told us:

Here's the FluffyChat subreddit, in order to provide more structured way of discussions, keep questions asked again and again in one place, and refer to older answers whenever the need is, as well as just to hang out


Nheko is a desktop client using Qt, Boost.Asio and C++17. It supports E2EE and intends to be full featured and nice to look at

Nico ( told us:

We've slowly been adding spaces support. Nheko can now show your spaces in the sidebar, filter on them and show a (very basic) overview page for a space. We are still playing around with what to actually put there, allow you to expand and collapse subspaces in the sidebar and allowing you to peek into rooms in a space, which you haven't joined yet. Creating and modifying spaces is also still work in progress until we figure out a proper design for it.


Nheko also now supports deeplinking using the matrix:// scheme


Dept of SDKs and Frameworks ๐Ÿงฐ

Matrix Dart SDK

krille offered:

The Dart language now has a new SDK for Matrix developed and maintained by and published here:

It provides a fully featured base for Dart and Flutter applications including E2EE, and Cross Signing. After more than 2 years of development we now declared it as stable. The Matrix Dart SDK (formerly known as famedly SDK) was initially a rewrite of the FluffyChat backend which was written in JavaScript. It came a long way since then and is now the base for the Famedly App and for the Flutter version of FluffyChat.

Hyper-targeted callback: Hey Naren, Famedly are the Matrix-using folk I was telling you about. This is the latest version of their Dart work and will be a great place to start building from.


tusooa offered:

kazv is a matrix client based on libkazv.

Talk to us on .


We got an AppImage build for x86-64 GNU/Linux systems. Feel free to try -))

Dept of Ops ๐Ÿ› 

Matrix Navigator

Christian announced:

Hi, I started a small, static webapp last weekend for viewing and modifying room states.

It can locally store multiple access tokens and helps debug and maintain room permissions. It's not looking fancy yet but already proved useful for many of the IRC support requests.

2021-06-18-fhMmB-Screenshot2021-06-18at17-33-21MatrixNavigator.png (statically hosted) (license not yet decided)

Dept of Bots ๐Ÿค–


Tulir told us:

The GitLab maubot plugin recently received major improvements to webhook handling. The Matrix messages now look much nicer (similar to the GitHub maubot plugin) and it also sends fancy reactions for CI status.

It's already in use in and Beeper's internal commit log room. It's unfortunately not yet available on, because I'm too lazy to write a migration script to copy data from the very old standalone gitlab bot written in Go.

In the future I might figure out some interoperability between the github and gitlab plugins so that I can also get CI reactions for my repos (which are primarily on github, but have CI on gitlab)


Dept of Events and Talks ๐Ÿ—ฃ๏ธ

Interoperability event hosted by, and featuring, Matrix

Denise offered:

Tomorrow Element will host an event alongside Protonmail, Open-Xchange and Open Forum Europe on the DMA and the topic of interoperability. This will be hosted on Matrix, based on the infrastructure first used during FOSDEM. The event will be livestreamed over on

Registration is free here:

NB this event took place earlier in the week, but we still wanted to honour it!

Message ร  Caractรจre Informatique

Brendan Abolivier announced:

I've been invited to appear in the latest episode of Clever Cloud's tech podcast Message ร  Caractรจre Informatique, where we talked mostly about Matrix and decentralisation, but also about a bunch of other interesting things ranging from timbl minting his source code as an NFT to how to hack autonomous car with sound. It was loads of fun, thanks to them for the invite!

The episode, which is in French (sorry non-French speakers!), is available here:

Perhaps to pique (French word?) our interest Brendan Abolivier added:

(if anyone's curious about the autonomous car hacking, which I found particularly interesting, the paper we were discussing is in english ๐Ÿ˜›)

Dept of Interesting Projects ๐Ÿ›ฐ๏ธ


MTRNord said:

After some fixes the bot is now back in shape. This means that all Rooms should again have the correct names from now on and accept invites again. Be aware the bot currently doesnt support encrypted rooms.

As a side effect also now found 3x the rooms as before.

Also the webpage got a big overhaul which brings a lot more mobile phone friendliness :) So you can finally properly use it on your phone as well.

Another change is that tombstoned rooms now get filtered from the list to keep it clean.

For developers a API reference is now available at

Also if you use the apis please note that the content is gzip encoded. The server currently doesnt respect the Accept-Encoding Header.

On the side of internal changes is now that the retries are limited to 5 times instead the previously buggy amount. This should reduce join requests from my server drastically.

For people usings the /servers api endpoint there is also now a include_members option. This means

now also gives unique servers based on known members.

Dept of Guides ๐Ÿงญ

A Matrix bot created with Simple-Matrix-Bot-Lib!

krazykirby99999 reported:

This bot is written with short, easy to understand Python code. Try writing your own bot with Python and Simple-Matrix-Bot-Lib!

This project is also a bot in itself, but I believe it is a great form of documentation, hence Guides section.

Easy guide to joining Matrix

Bram told us:

After having tried to convince several people to join the Matrix, my main conclusion is that it's too difficult for people. Apps that big tech companies produce are so simple that having to choose a client, choose (or set up) a homeserver and building bridges is too much of a push factor from the Matrix.

To help those people, I've written a quick guide that should help people without a programming background join the Matrix. I'm using this as a reference when people ask how they could join the Matrix, feel free to do this yourself as well:

Matrix in the News ๐Ÿ“ฐ

German universities survey

Remember the survey of German universities we reported on a few weeks ago? There is now an english-language version of the results available.

Wired article now online

Cat announced:

Remember the Wired article we spotted in the print edition and got a blurry picture of? It has now made it onto their website.

Final Thoughts ๐Ÿ’ญ

Room of the week

timokoesters reported:

Hi everyone! Did you ever feel lost in the Matrix world? The room directory is big, but it's still hard to find something you like. Or are you a room moderator, but there is not much activity in your room because it doesn't have enough users?

This is why I want to share rooms (or spaces) I find interesting.

This week's room is:

"People reading eBooks usually know Calibre (, one of the most prominent ebook management solutions by Kovid Goyal. We've had an "unofficial" (as in: Kovid doesn't like real-time communications :) ) channel on what used to be freenode that I've moved to Libera and which is - of course! - bridged to #calibre" ~Philantrop

If you want to suggest a room for this section, send a Matrix message in

Dept of Ping ๐Ÿ“

Here we reveal, rank, and applaud the homeservers with the lowest ping, as measured by pingbot, a maubot that you can host on your own server.

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

Join to experience the fun live, and to find out how to add YOUR server to the game.

RankHostnameMedian MS

That's all I know ๐Ÿ

See you next week, and be sure to stop by with your updates!

Synapse 1.36.0 released

15.06.2021 11:20 โ€” Releases โ€” Dan Callahan
Last update: 14.06.2021 23:14

Synapse 1.36.0 is out, and it's a big one!

Room Join Memory Improvements

We did it! Synapse no longer experiences a memory spike when joining large / complex rooms.

Memory usage graph for Synapse 1.33 and 1.36

These improvements mainly arise from processing join responses incrementally, rather than trying to load everything into memory at once. However, realizing these gains involved a fair bit of rewriting, as the entire processing pipeline had to work incrementally, and with appropriately sized batches, to avoid downstream bottlenecks. You can hear more about our original plans for this work in last month's Matrix Live: S6E23 โ€” Dan and Erik talk about Synapse.

Presence Improvements

Running presence on a single worker process is now expected to work correctly. This feature first debuted in Synapse 1.33, but a few bugs cropped up which could lead to presence state becoming outdated. With #10149 merged, we believe the last of these issues to be resolved.

We had also noticed a recent increase in presence load on federation workers; this was ultimately tracked to two bugs, both fixed in this release: We were processing local presence via federation workers (#10163) and we were occasionally sending duplicate presence updates (#10165).

With both issues fixed, outgoing federation load has returned to normal levels:

Graph of outgoing federation transaction rate ranging from around 75 Hz down to under 25 Hz

(Thank you to David Mehren for this graph from issue #10153)

Everything Else

Synapse now has two new Admin APIs for unprotecting and removing media from quarantine, thanks to contributions by dklimpel.

Synapse now implements the stable /_matrix/client/r0/rooms/{roomId}/aliases endpoint originally introduced by MSC2432, and, thanks to contributions by govynnus, makes the reason and score fields of event reports optional per MSC2414.

These are just the highlights; please see the Release Notes for a complete list of changes in this release.

Synapse is a Free and Open Source Software project, and we'd like to extend our thanks to everyone who contributed to this release, including 14mRh4X0r, aaronraimist, bradtgmurray, crcastle, dklimpel, govynnus, and RhnSharma.

Adventures in fuzzing libolm

14.06.2021 00:00 โ€” Security โ€” Denis Kasak


Hi all! My name is Denis and I'm a security researcher. Six months ago, I started working for Element on doing dedicated security research on important Matrix projects. After some initial focus on Synapse, I decided to take a closer look at libolm. In this entry, I'd like to present an overview of that work, along with some early fruits that came out of it.

TL;DR: we found some bugs which had crept in since libolm's original audit in 2016, thanks to properly overhauling our fuzzing capability, and we'd like to tell you all about it! The bugs were not easily exploitable (if at all), and have already been fixed.

Update: CVE-2021-34813 has now been assigned to this.

To give a bit of a background, libolm is a cryptographic library implementing the Double Ratchet Algorithm pioneered by Signal and it is the cryptographic workhorse behind Matrix. The classic algorithm is called Olm in Matrix land, but libolm also implements Megolm which is a variant for efficient encrypted group chats between many participants.

Since libolm is currently used in all Matrix clients supporting end-to-end encryption, it makes for a particularly juicy target. The present state of libolm's monopoly on Matrix encryption is somewhat unfortunate -- luckily there are some exciting new developments on the horizon, such as the vodozemac implementation in Rust. But for now, we're stuck with libolm.

To start, I decided to do a bit of fuzzing. libolm already had a fuzzing setup using AFL, but it was written a while ago. The state of the art in fuzzing had advanced quite rapidly in the last few years, so the setup was missing many modern features and techniques. As an example, the fuzzing setup was configured to use the now ancient afl-gcc coverage mode, which can be slower than the more modern LLVM-based coverage by a factor of 2.

I also noticed that the fuzzing was done with non-hardened binaries (instead of using something like ASAN), so many memory errors could've gone unnoticed. There were also no corpora available from previous fuzzing runs and some of the newer code was not covered by the harnesses.


I decided to tackle these one by one, adding ASAN and MSAN builds as a first step. I took the opportunity to switch to AFL++ since it is a drop-in replacement and contains numerous improvements, notably improved coverage modes which are either much faster (e.g. LLVM-PCGUARD) or guaranteed to have no collisions (LTO)1. AFL++ also optimizes mutation scheduling (by using scheduling algorithms from AFLFast) and mutation operator selection (through MOpt). All of this makes it much more efficient at discovering bugs.

After this, I changed the existing harnesses to use AFL's persistent mode (which lowers process creation overhead and thus increases fuzzing performance). This change, combined with the switch to a newer coverage mode, increased the fuzzing exec/s from ~2.5k to ~5.5k on my machine, so this is not an insignificant gain!


In the context of fuzzing, collisions are situations where two different execution paths appear to the fuzzer as the same one due to technical limitations. Classically, AFL tracks coverage by tracking so-called "edges" (or "tuples"). Edges are really pairs of (A, B), where A and B represent basic blocks. Each edge is meant to represent a different execution "jump", but sometimes, as the number of basic blocks in a program grows, two different execution paths can end up being encoded as the same edge. LTO mode in AFL++ does some magic so that this is guaranteed not to happen.

After this preparatory work, I generated a small initial corpus and ran a small fleet of fuzzers with varying parameters. Almost immediately, I started getting heaps of crashes. Luckily, after some investigation, these turned out not to be serious bugs in the library but a double-free in the fuzzing harness! The double-free only got triggered when the input was of size 0. It also only happened with AFL++ and not vanilla AFL, presumably due to differences in input trimming logic, which must be the reason no one noticed this earlier. I quickly came up with a patch and resumed.

The plot thickens

I let the fuzzers run for a while. Since ASAN introduces a bit of a performance overhead, I only run a single AFL instance with ASAN variant of the binary. This is okay because all fuzzer instances actually synchronize their findings, which means every instance gets to see every input which increases coverage. When I came back to check, there was another crash waiting. This time the crashing input wasn't being generated continually so it looked much more promising -- and only the ASAN instance was crashing. A-ha!

Running the offending input on the ASAN variant of the harness revealed it was an invalid read one byte past the end of a heap buffer. The read was happening in the base64 decoder:

โฎ ./build/fuzzers/fuzz_group_decrypt_asan "" pickled-inbound-group-session.txt <input
==1838065==ERROR: AddressSanitizer: heap-buffer-overflow on address 0xf4a00795 at pc 0x56560660 bp 0xffff9df8 sp 0xffff9de8
READ of size 1 at 0xf4a00795 thread T0
    #0 0x5656065f in olm::decode_base64(unsigned char const*, unsigned int, unsigned char*) src/base64.cpp:124
    #1 0x565607b5 in _olm_decode_base64 src/base64.cpp:165
    #2 0x565d5a9e in olm_group_decrypt_max_plaintext_length src/inbound_group_session.c:304
    #3 0x56558e75 in main fuzzers/fuzz_group_decrypt.cpp:46
    #4 0xf7509a0c in __libc_start_main (/usr/lib32/
    #5 0x5655a0f4 in _start (/home/dkasak/code/olm/build/fuzzers/fuzz_group_decrypt_asan+0x50f4)

0xf4a00795 is located 0 bytes to the right of 5-byte region [0xf4a00790,0xf4a00795)
allocated by thread T0 here:
    #0 0xf7a985c5 in __interceptor_malloc /build/gcc/src/gcc/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x56558ce3 in main fuzzers/fuzz_group_decrypt.cpp:32
    #2 0xf7509a0c in __libc_start_main (/usr/lib32/

SUMMARY: AddressSanitizer: heap-buffer-overflow src/base64.cpp:124 in olm::decode_base64(unsigned char const*, unsigned int, unsigned char*)
Shadow bytes around the buggy address:
  0x3e9400a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x3e9400b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x3e9400c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x3e9400d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x3e9400e0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x3e9400f0: fa fa[05]fa fa fa 05 fa fa fa fa fa fa fa fa fa
  0x3e940100: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x3e940110: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x3e940120: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x3e940130: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x3e940140: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc

Following the stack trace, I quickly pinpointed the root of the bug: the logic of the decoder was subtly flawed, unconditionally accessing a remainder byte2 in the base64 input which might not actually be there. This occurs when the input is 1 (mod 4) in length, which can never happen in a valid base64 payload, but of course we cannot assume all inputs are necessarily valid payloads. Specifically, if the payload was not 0 (mod 4) in length, the code was assuming it was at least 2 (mod 4) or more in length and immediately read the second byte. This spurious byte was then incorporated into the output value.


By remainder byte, I mean bytes which are not part of a group of 4. These can only occur at the end of a base64 payload and they're the ones that get suffixed with padding in padded base64.

I examined the code in an attempt to find a way to have it leak more than a single byte, but it was impossible. As it turned out, not even the full byte of useful information was encoded into the output -- due to the way the byte is encoded, only about 6 bits of useful information ended up in the output value.

Still, even a single leaked bit is too much in a cryptographic context. Could we do some heap hacking so that something of interest is placed there and then have it be leaked to us?

I next tracked down all call sites of the vulnerable function olm::decode_base64. Most of them were immune to the problem since they were preceded with calls to another function, olm::decode_base64_length, which checks that the base64 payload is of legal length. This left me with only a few potentially vulnerable call sites, so I examined where their base64 inputs come from. Promisingly, two of them received input from other conversation participants, but they either had no way of leaking the information back to the attacker or they hardcoded the number of bytes to be processed, after ensuring the input was of some minimum length. The output of the remaining function olm_pk_decrypt is never sent anywhere externally, so there was again no way of leaking the data to the attacker.

In conclusion, even though this invalid read is a valid bug, I was not able to find a working exploit for it.

But wait a second! Something was still bothering me about olm_pk_decrypt. It's a fairly complex function, receives several string inputs from the homeserver and it itself isn't tested by any of the harnesses. Furthermore, the reason I started looking at it in the first place is that it was missing the olm::decode_base64_length check. Perhaps it warrants a closer look?

It does

And sure enough, there was something amiss. As olm_pk_decrypt receives three base64 inputs from the homeserver: the ciphertext to decrypt, an ephemeral public key and a MAC. All three are eventually passed to olm::decode_base64 to be decoded. Yet there was only a single length check there, to ensure the decrypted ciphertext would fit its output buffer. What would happen if the server returned a public key that was longer than expected?

struct _olm_curve25519_public_key ephemeral;
    (const uint8_t*)ephemeral_key, ephemeral_key_length,
    (uint8_t *)ephemeral.public_key

As can be seen from the snippet, the decoded version of public key gets written to ephemeral.public_key, which is an array allocated on the stack. If the input is longer than expected, this will become a stack buffer overflow.

The purpose of olm_pk_decrypt is to decrypt secrets previously stored by a Matrix device on the homeserver. The point of encryption is to prevent the server from learning these secrets since they're supposed to be known only by your own devices. One use case for this mechanism is to allow one of your devices to store encrypted end-to-end encryption keys on the homeserver. Your other devices can then retrieve those keys from the homeserver, making it possible to view all of your private conversations on each of your devices.

I decided to go for an end-to-end test to confirm the bug is triggerable by connecting with the latest Element Android from my test phone to my homeserver, with mitmproxy sitting in between. This allowed me to write a small mitmproxy script which intercepts HTTP calls fetching the E2E encryption keys from the homeserver and modifies the response so that the key is longer than expected.

import json

from mitmproxy import ctx, http

def response(flow: http.HTTPFlow) -> None:
    if ("/_matrix/client/unstable/room_keys/keys" in flow.request.pretty_url
            and flow.request.method == "GET"):

        response_body = flow.response.content.decode("utf-8")
        response_json = json.loads(response_body)

        rooms = response_json["rooms"]
        room_id = list(rooms.keys())[0]

        sessions = rooms[room_id]["sessions"]
        session = list(sessions.keys())[0]
        session_data = sessions[session]["session_data"]

        ephemeral = session_data["ephemeral"]"Replacing ephemeral key '{ephemeral}' with '{ephemeral * 10}'")
        session_data["ephemeral"] = ephemeral * 10

        modified_body = json.dumps(response_json).encode("utf-8")
        flow.response.content = modified_body

This longer value is then eventually passed by Element Android to libolm's olm_pk_decrypt, which triggers the buffer overflow. With all of that in place, I deleted the local encryption key backup on my device and asked for it to be restored from the server:

F libc    : stack corruption detected (-fstack-protector)
F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 24517 (DefaultDispatch), pid 24459 (
F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
F DEBUG   : Build fingerprint: 'xiaomi/tissot/tissot_sprout:9/PKQ1.180917.001/V10.0.24.0.PDHMIXM:user/release-keys'
F DEBUG   : Revision: '0'
F DEBUG   : ABI: 'arm64'
F DEBUG   : pid: 24459, tid: 24517, name: DefaultDispatch  >>> <<<
F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
F DEBUG   : Abort message: 'stack corruption detected (-fstack-protector)'
F DEBUG   :     x0  0000000000000000  x1  0000000000005fc5  x2  0000000000000006  x3  0000000000000008
F DEBUG   :     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000030
F DEBUG   :     x8  0000000000000083  x9  7d545b4513138652  x10 0000000000000000  x11 fffffffc7ffffbdf
F DEBUG   :     x12 0000000000000001  x13 0000000060b0f2a9  x14 0022ed916fede200  x15 0000d925cd93f18f
F DEBUG   :     x16 00000079e741b2b0  x17 00000079e733c9d8  x18 0000000000000000  x19 0000000000005f8b
F DEBUG   :     x20 0000000000005fc5  x21 0000007940e3c400  x22 000000000000026b  x23 00000000000001d0
F DEBUG   :     x24 000000000000002f  x25 000000793d9653f0  x26 0000007948303368  x27 0000007945dd5588
F DEBUG   :     x28 00000000000001d0  x29 0000007945dd37d0
F DEBUG   :     sp  0000007945dd3790  lr  00000079e732e00c  pc  00000079e732e034


This vulnerability is a server-controlled stack buffer overflow in Matrix clients supporting room key backup.

Of course, the largest fear stemming from any remotely controlled stack buffer overflow is code execution. This is perhaps even doubly so in a cryptographic library, where we have the additional worry of an attacker being able to leak our dearly protected conversations.

The federated architecture of Matrix may be somewhat of a mitigating circumstance in this case, since users are much more likely to know and trust the homeserver owner, but we don't want to have to rely on this trust.

Native binaries

Luckily, on its own, this bug is not enough to successfully execute code on native binaries. By default, libolm is compiled for all supported targets with stack canaries (also called stack protectors or stack cookies), which are magic values unknown to the attacker, placed just before the current function's frame on the stack. This value is checked upon returning from the function -- if its value is changed, the process aborts itself to prevent further damage. This is evident from the Abort message: 'stack corruption detected (-fstack-protector)' message above. Besides canaries, other system-level protections exist to make exploiting bugs such as this harder, such as ASLR.

Therefore, to achieve remote code execution, an attacker would need to find additional vulnerabilities which would allow him to exfiltrate the stack canary and addresses of key memory locations from the system.


With WASM, the analysis is much more complicated due to its very different memory and execution model. In WASM, the unmanaged stack is generally much more vulnerable due to it missing support for stack canaries. This implies a stack buffer overflow can not only overwrite the frame of the function in which the overflow occurred but also all parent frames.

On the other hand, due to typed calls and much stronger control-flow integrity techniques, it's much harder for the attacker to make the code do something that is (maliciously) useful. Notably, return addresses live outside unmanaged memory and are out of reach to the attacker. Because of this, the primary way of influencing code execution is by manipulating call_indirect instructions in such a way as to call.

The analysis of the impact of this bug on the WASM binary is thus left as an exercise to the reader. If you're interested, the 2020 USENIX paper Everything Old is New Again: Binary Security of WebAssembly is a great starting point.

The fix

Once the problems were identified, the patches were rather trivial and the issues were promptly resolved. The first libolm release that includes the fix is 3.2.3 which was released on 2021-05-25.

We reached out to all Matrix clients which were determined to be affected. The Element client versions which first fix the issue are as follows:

  • Element Web/Desktop: v1.7.29
  • Element Android: v1.1.9
  • Element iOS: v1.4.0

For the mobile clients, these versions are already available in their respective application stores at the time of publishing this post. If you haven't already, please upgrade.

Future work

Even though the fuzzing setup is in a much better shape now (or rather will be, since I still have some PRs to merge upstream), there's still a lot that can be done to further improve it.

Right now, there are undoubtedly parts of the codebase that are not fuzzed well. The reasons for this range from the obvious, like some parts of the code simply not being called by any the existing harnesses, to more subtle ones such as the fact that cryptographic operations form a nearly-insurmountable natural barrier for naive fuzzing operations3. Finally, some of the existing harnesses accept additional parameters as command-line arguments, meaning we would have to re-run the same harness with different values of those parameters in order to reach full coverage of the code. This is suboptimal.

So the plan for future work is roughly as follows:

  1. Write missing harnesses to cover more portions of the codebase.
  2. Write starting corpus generators. These should generate believable, valid input for each of the harnesses. For example, for the decryption harness, we should generate a variety of encrypted messages: empty, short, long, text, binary, etc.
  3. Modify the harnesses so that their extra parameters are determined from the fuzzed input. This will allow the fuzzer to vary these itself, which reduces the importance of the human in the loop and makes it harder to forget some combination.
  4. Fuzz for some time until coverage stops increasing. The corpora generated should be saved so that future fuzzing attempts can resume from an earlier point so that this work is not wasted.
  5. Use afl-cov to investigate which parts of the code are not covered well or at all. This should inform us what further changes are needed.
  6. Write intelligent, custom mutators. These will allow the fuzzer to take a valid input and easily produce another valid input instead of only corrupting it with a high probability.
  7. Design harnesses which test for wanted semantic properties instead of only memory errors.

Classic fuzzers famously have a hard time circumventing magic values and checksums, and cryptography is full of these. This is further complicated by the fact that the double ratchet algorithm is very stateful and depends on the two ratchets evolving in lockstep. This means that even if, for example, the decryption harness is supplied with a corpus of valid encrypted messages, the mutations done by the fuzzer would only manage to produce corrupted versions of those messages which will fail to decrypt, but it will ~never manage to produce a different valid encrypted message.

It's very exciting that we're able to do full-time security research on Matrix these days (thanks to Element's funding), and going forwards we'll publish any interesting discoveries for the visibility and education of the whole Matrix community. We'd also like to remind everyone that we run an official Security Disclosure Policy for and we'd welcome other researchers to come join our Hall of Fame! (And hopefully we will get more bounty programmes running in future.)