plate website

Leave messages in Synapse logs with typing EDUs

let me show you how to really communicate on Matrix.

basics

Matrix itself

Matrix is a federated communication protocol, mainly used for chat. servers send signed JSON to eachother over HTTP, this is federation. there’s a lot more detail to this that i don’t fully get, but it’s not important for this post.

EDUs and PDUs

even if you have general awareness of Matrix, you may still ask, “’typing EDU’? what’s an EDU?”

well, Matrix has two basic units of data. the Persistent Data Unit (PDU), which carries timeline events like your messages, or room state like the room name and members.

then there’s the Ephemeral Data Unit. things like presence, read receipts and typing notifications are EDUs. they’re not persisted by servers and as such aren’t stored anywhere.

EDUs are much simpler. they’re easier to craft than PDUs because you don’t have to deal with hashing or state resolution.

transactions

how do these get across the federation, then? they’re batched in transactions. when a server wants to send things1, up to 50 PDUs and 100 EDUs are combined and sent (see the spec for more).

now i’ve covered some basics, let’s move to the fun part.

Synapse logging EDUs

Synapse is the most used server implementation on Matrix. it also has a logging quirk that we can use to leave messages for admins!

so let’s say we send a transaction to Synapse with a typing EDU (m.typing), with a bogus room ID that the server doesn’t recognise:

{
	"content": {
		"room_id": "hello",
		"typing": true,
		"user_id": "@user:m3.squarebowl.club"
	},
	"type": "m.typing"
}

what happens is this:

2026-08-13 12:38:04,098 - synapse.handlers.typing - 407 - INFO - PUT-106612 - Ignoring typing update for room 'hello' from server m3.squarebowl.club as we're not in the room

it went, “wait, this isn’t even for a room i’m in” and logged it. notice how it doesn’t even need to be a valid room ID (which should start with !). this is a great opportunity.

what if we send multiple EDUs, with more fun room IDs - like lines of ASCII art?:

A screenshot of Rika Furude ASCII art in my Synapse logs, line by line

the art in the screenshot was found here.

i tried a few different images before getting this one2. i recommend using smaller art, so Synapse logs it in order. otherwise, you may get this:

A similar screenshot of Rika Furude, with lines out of order

making the server

of course, to participate in federation you need to be a homeserver, because requests are signed and servers will look for your keys.

the bare minimum for this is responding to /_matrix/key/v2/server, which is quite easy with mautrix/go! its federation package has a key server (needed to look like a real homeserver) and a client for making federation requests.

i made a small server to do this. if you too want to troll admins by asking them to check their logs, please see plate/m3 on my Forgejo.


  1. most of the time, i think. actions like invites, joins, leaves or knocks have their own endpoints ↩︎

  2. and i’ve never played or watched higurashi… ↩︎

#Matrix