Giter VIP home page Giter VIP logo

matrix-qq-bridge's Introduction

matrix-qq-bridge

Work in progress. A Matrix-QQ puppeting bridge based on Trixnity and Mirai.

Building

$ gradle installDist

JARs and a wrapper can be found in app/build/install/app/.

Deployment

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

Using Nix flakes

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"
          ];
        }
      ];
    };
  };
}

Usage

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

Features and roadmap

  • 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
  • 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

matrix-qq-bridge's People

Contributors

chuangzhu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.