Push remote for OOYE contributions
  • JavaScript 96.7%
  • Pug 3.3%
Find a file
l1s5 c70597a665
matrix: stricter mxid validation
This commit refactors various instances of mxid matching so that there
is a single well-tested regex that can be reused everywhere. The new
regex is made to match the specification word for word, and should
hopefully rule out most over- and undermatching.

By chance, this also fixes a bug in `src/discord/interactions/ping.js`
where the autocomplete tried matching an mxid against a raw sql query
rather than the provided input.
2026-11-04 05:53:33 +09:00
.vscode Dependency review 2026-10-27 01:54:42 +13:00
docs Dependency review 2026-10-27 01:54:42 +13:00
scripts Add script for creating privacy policy contact 2026-10-26 23:16:02 +13:00
src matrix: stricter mxid validation 2026-11-04 05:53:33 +09:00
test Merge branch 'd2m-html-injection-fixes' 2026-11-03 21:35:38 +13:00
.c8rc.json Rearrange code (self-review) 2024-03-04 17:02:38 +13:00
.gitignore Fix regular expression denial of service 2026-10-30 21:39:38 +13:00
addbot.js Future-proof permissions 2025-12-05 17:13:56 +13:00
addbot.sh Remove token from config file 2024-09-13 23:47:11 +12:00
COPYING license nicense 2023-10-02 23:12:03 +13:00
jsconfig.json Fix typecheck 2026-02-11 11:31:27 +13:00
package-lock.json v3.8.1 2026-10-30 21:59:38 +13:00
package.json v3.8.1 2026-10-30 21:59:38 +13:00
readme.md Add AI policy 2026-09-11 12:57:46 +12:00
start.js Merge branch 'l1s5-heatsync-fixes' 2026-10-27 00:21:42 +13:00

Out Of Your Element

Modern Matrix-to-Discord appservice bridge, created by @cadence:cadence.moe

Releases Discuss on Matrix

AI policy

Out Of Your Element is 100% organically cultivated ethical hand-fed code. Let's work together to conserve that!

Why a new bridge?

  • Modern: Supports new Discord features like replies, threads and stickers, and new Matrix features like edits, spaces and space membership.
  • Efficient: Special attention has been given to memory usage, database indexes, disk footprint, runtime algorithms, and queries to the homeserver. Efficiency details.
  • Reliable: Any errors on either side are notified on Matrix and can be retried. Messages sent during bridge downtime will still be bridged after it comes back up.
  • Tested: A test suite and code coverage make sure all the logic and special cases work.
  • Simple development: No build step (it's JavaScript, not TypeScript), minimal/lightweight dependencies, and abstraction only where necessary so that less background knowledge is required. No need to learn about Intents or library functions.
  • No locking algorithm: Other bridges use a locking algorithm which is a source of frequent bugs. This bridge avoids the need for one.
  • Latest API: Being on the latest Discord API version lets it access all features, without the risk of deprecated API versions being removed.

What works?

Most features you'd expect in both directions: messages, edits, deletions, formatting (including spoilers), reactions, custom emojis, custom emoji reactions, mentions, channel mentions, replies, threads, stickers (all formats: PNG, APNG, GIF, Lottie), attachments, spoiler attachments (compatible with most clients), embeds, URL previews, presence, discord.com hyperlinks, and more.

Metadata is also synced: people's names, avatars, usernames; channel names, icons, topics; spaces containing rooms; custom emoji lists. Syncing Matrix rooms, room icons, and topics is optional: you can keep them different from the Discord ones if you prefer.

I've also added some interesting features that I haven't seen in any other bridge:

  • Members using the PluralKit bot each get their own persistent accounts
  • Replies from PluralKit members are restyled into native Matrix replies
  • Simulated user accounts are named @the_persons_username rather than @112233445566778899
  • Matrix custom emojis from private rooms are still visible on Discord as a sprite sheet
  • To save space, larger files from Discord are linked instead of reuploaded to Matrix (links don't expire)

For more information about features, see the user guide.

Caveats

  • This bridge is not designed for puppetting.
  • Direct Messaging is not supported until I figure out a good way of doing it.
  • Encrypted messages are not supported. Decryption is often unreliable on Matrix, and your messages end up in plaintext on Discord anyway, so there's not much advantage.

Get started!

Read the installation instructions →