No description
Find a file
2025-11-15 20:47:58 +00:00
.direnv initial commit 2024-11-25 23:47:15 -08:00
.github/workflows ci: Don't try to do Node stuff 2025-11-15 16:18:20 +00:00
nix bump nix dependencies, upgrading rustc to 1.90.0 and rust edition 2024 2025-10-03 17:39:25 -07:00
npins bump nix dependencies, upgrading rustc to 1.90.0 and rust edition 2024 2025-10-03 17:39:25 -07:00
src chore: Upgrade deps 2025-11-15 20:47:46 +00:00
tests store old user id in plans 2025-10-03 22:37:45 -07:00
wix chore: Setup dist 2025-11-15 16:09:11 +00:00
.envrc initial commit 2024-11-25 23:47:15 -08:00
.gitignore initial commit 2024-11-25 23:47:15 -08:00
Cargo.lock chore: Release matrix-user-swap version 0.1.2 2025-11-15 20:47:58 +00:00
Cargo.toml chore: Release matrix-user-swap version 0.1.2 2025-11-15 20:47:58 +00:00
default.nix initial commit 2024-11-25 23:47:15 -08:00
dist-workspace.toml chore: Setup dist 2025-11-15 16:09:11 +00:00
engage.toml initial commit 2024-11-25 23:47:15 -08:00
LICENSE-Apache-2.0.txt initial commit 2024-11-25 23:47:15 -08:00
LICENSE-MIT.txt initial commit 2024-11-25 23:47:15 -08:00
README.md implement password authentication 2025-10-03 15:58:42 -07:00
rust-toolchain.toml bump nix dependencies, upgrading rustc to 1.90.0 and rust edition 2024 2025-10-03 17:39:25 -07:00
rustfmt.toml initial commit 2024-11-25 23:47:15 -08:00
shell.nix initial commit 2024-11-25 23:47:15 -08:00

matrix-user-swap

A tool to migrate between matrix user accounts. This is the same general idea as EMS Migrator, but with the intent of being less bad.

Migrated State

  • Joined rooms
  • User power level in each joined room
  • Tags in each joined room (the m.tag room account data event)
  • Direct message mappings (the m.direct global account data event)
  • Ignored users (the m.ignored_user_list global account data event)

Limitations

  • Rate-limiting is not implemented. This will likely only work with conduit-family servers, which don't implement server-side rate limiting. (planned)
  • Migrating between users on different homeservers is unsupported. (planned)

State that is not migrated

  • Global displayname/avatar and per-room displaynames/avatars (planned)
  • MSC2545 user custom emotes/sticker packs (planned)
  • Invited/left rooms (not planned, infeasible)
  • Knocked rooms (not planned)
  • Room history (not planned, infeasible)
  • Push rules and client settings (not planned)

Installation

With nix

git clone https://gitlab.computer.surgery/olivia/matrix-user-swap.git
cd matrix-user-swap
nix-build

The binary will be in result/bin/matrix-user-swap.

Without nix

Install rust with rustup (or your system package manager), then:

git clone https://gitlab.computer.surgery/olivia/matrix-user-swap.git
cd matrix-user-swap
cargo build --release

The binary will be in target/release/matrix-user-swap.

Usage

Acquire access tokens from the old and new accounts. This can generally be extracted from a logged-in client. In Element, the access token is under the "Help & About" tab in settings.