]> jfr.im git - irc/freenode/web-7.0.git/blob - content/news/2021-01-21-matrix-bridge-realname.md
Revert draft
[irc/freenode/web-7.0.git] / content / news / 2021-01-21-matrix-bridge-realname.md
1 ---
2 author: jess
3 date: 2021-01-21T20:00:00
4 slug: matrix-bridge-realname
5 title: Changes to realnames of matrix.org bridged users
6 category: announcements
7 category: technical
8 ---
9
10 [matrix.org](https://matrix.org/) runs a bridge (matrix-appservice-irc) from
11 their Matrix homeserver to freenode that allow Matrix users from any
12 homeserver that federates with matrix.org to join channels on freenode and
13 intermingle with the normal IRC userbase. These users have their Matrix User
14 Id (username and homeserver, e.g. `@jess:freenode.net`) put in the realname
15 field of their IRC connection.
16
17 Over time, the need to differentiate users by which homeserver they are using
18 has arisen for multiple reasons, and we've worked with the matrix.org bridge
19 operators to better format Matrix User Ids to suit the limited space provided
20 by IRC realnames.
21
22 Realnames pose a slight problem for this usage; the maximum length for a
23 Matrix User Id is 255 characters, whereas the maximum length for an IRC
24 realname is 50 characters and things longer than that get truncated, which
25 means if people have a Matrix username of 50 characters, it will truncate off
26 the entirety of their homeserver.
27
28 The solution we came up with for this has been to reverse the order of
29 username and homeserver, and then reverse the order of domain name parts and
30 truncate that at 30 characters, which means the most significant parts of a
31 homeserver's domain name comes at the start of a realname. For example,
32 `@jess:freenode.net` becomes `net.freenode:jess`. If a homeserver is truncated
33 to 30 characters, a `>` is appended prior to the `:` -
34 `@jess:subdomaaaaaaaaaain.freenode.net` would become
35 `net.freenode.subdomaaaaaaaaaai>:jess`.
36
37 We'd like to extend deep gratitude to the operators of the matrix.org bridge
38 for handling and implementing our change request quickly to suit a
39 contemporary need, and we'd like to remind users that they can message staff
40 at any time if they have any questions about the above changes.