You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Inex Code 73042f8e93 Initial support for user tokens 3 days ago
.devcontainer Initial commit 3 weeks ago
.github/workflows Create codeql-analysis.yml 3 weeks ago
src Initial support for user tokens 3 days ago
.gitignore Initial commit 3 weeks ago
LICENSE Initial commit 3 weeks ago
README.md Initial support for user tokens 3 days ago
package-lock.json Forwards formatting 5 days ago
package.json Initial support for user tokens 3 days ago
sample.config.yaml Update readme and default log level 1 week ago
tsconfig.json Initial commit 3 weeks ago
tslint.json Linting 1 week ago

README.md

Matrix

mx-puppet-vk

This is a Matrix <-> VK bridge based on mx-puppet-bridge and VK-IO.

It is in early development. Right now it logs message data when log level includes "info" level.

Relay mode works too, but we don't recommend it.

Installation

git pull https://github.com/innereq/mx-puppet-vk
npm install
npm run build

Next copy the sample.config.yaml to config.yaml, edit it and then run npm run start -- -r to generate a registration file. Register that one with synapse and start the bridge with npm run start.

Features and roadmap

  • Matrix -> VK
  • VK -> Matrix
  • Edge cases to work around
    • Probably more, send an issue!

Usage

Video demonstration by Coma Grayce

  1. Get VK community token (Just open the "Manage community" tab, go to "API usage" tab and click "Create token")
  2. Activate Bots Long Poll API ("Manage community" → "API usage" → "Bots Long Poll API") and choose the latest API version. Make sure that under event types all message-realted events are turned on.
  3. Activate an option to message your community. To allow group chats, activate it under bot capabilities.
  4. On matrix, contact @_vk_puppet_bot:your.domain and type link <vk token>
  5. Now, if someone contacts your community, you will be invited to the corresponding room on Matrix.

Plese note: when community is invited to the group chat as a bot, make sure it has message access. Only chat admins can change bot permissions.

Bridge doesn't handle being kicked from chat yet.

Relay usage

See mx-puppet-bridge docs

Note on presence from matrix side

For presence bridging from Matrix side (including typing) your Synapse server has to be on 1.22.0 or later.

Also, make sure your registration file contains this:

de.sorunome.msc2409.push_ephemeral: true

Using a user token instead of group bot

This is experimental and is not the main goal of this bridge.

To get a user token, use something like this:

https://oauth.vk.com/authorize?client_id=<CLIENT_ID>&display=page&redirect_uri=https://oauth.vk.com/blank.html&scope=friends,messages,offline,docs,photos,video'&response_type=token&v=5.126
  • Matrix -> VK (AS A USER)
  • VK (AS A USER) -> Matrix

To avoid imposture, do not use relay mode with user tokens!