Work in progress. A Matrix-QQ puppeting bridge based on Trixnity and Mirai.
$ gradle installDist
JARs and a wrapper can be found in app/build/install/app/
.
A example config for the bridge is at config-example.yaml.
Generate registration config file for your homeserver:
$ ./app/build/install/app/bin/app config.yaml > qq-registration.yaml
Add the registration config file to your homeserver's config:
# Synapse
app_service_config_files:
- /path/to/your/qq-registration.yaml
# Dendrite
app_service_api:
config_files:
- /path/to/your/qq-registration.yaml
Restart the homeserver, then start the bridge:
$ ./app/build/install/app/bin/app config.yaml qq-registration.yaml
This repository is a flake, and it includes a NixOS module.
{
inputs.matrix-qq-bridge.url = "github:chuangzhu/matrix-qq-bridge";
outputs = { self, nixpkgs, matrix-qq-bridge }: {
nixosConfigurations.your-host-name = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
matrix-qq-bridge.nixosModules.matrix-qq-bridge
{
services.matrix-qq-bridge = {
enable = true;
settings = { /* Configuration as Nix attribute set */ };
serviceDependencies = [ "matrix-synapse.service" ];
};
services.matrix-synapse = {
enable = true;
settings.app_service_config_files = [ "/run/credentials/matrix-synapse.service/matrix-qq-bridge" ];
};
systemd.services.matrix-synapse.serviceConfig.LoadCredential = [
"matrix-qq-bridge:/var/lib/matrix-qq-bridge/qq-registration.yaml"
];
}
];
};
};
}
Create a direct chat with @<appservice.bot_username>:<homeserver.domain>
. Available commands:
!login
- Get instruction to login to QQ.!listclient
- List other clients of current QQ account.!cancel
- Cancel an ongoing action
- QQ → Matrix
- Message content
- Text
- Files (partial implementation in Mirai, group only)
- Picture
- Sticker
- Emoji
- Message reply
- Mention
- Nudge
- Recall message
- Miniapp message
- Forwarded message
- Audio
- Location (not yet supported by Mirai)
- Video (not yet supported by Mirai)
- Group message
- Friend message
- Stranger message
- OtherClient message
- Presence
- Group permissions
- Membership actions (invite/kick/join/leave/mute)
- Initial chat metadata
- Group name
- Group avatar
- User name
- User avatar
- Chat metadata changes
- Group name
- Group avatar
- Group member name
- Group member avatar
- Friend nick
- Friend avatar
- Stranger nick
- Stranger avatar
- Double puppeting
- Message content
- Matrix → QQ
- Message content
- Text
- Files
- Picture
- Sticker
- Emoji
- Message reply
- Mention
- Redact message (within 2 mins)
- Edit message (recall and resend, within 2 mins)
- Location
- Audio
- Video (to a file)
- Room message
- Direct message
- Relay userbot and plumbed room
- Message content