1.8 KiB
1.8 KiB
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.tagroom account data event) - Direct message mappings (the
m.directglobal account data event) - Ignored users (the
m.ignored_user_listglobal 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.