mx-puppet-vk/README.md

77 lines
2.9 KiB
Markdown
Raw Normal View History

2020-11-21 20:17:00 +00:00
[![Matrix](https://img.shields.io/matrix/mx-puppet-vk:sunbutt.faith?logo=matrix&server_fqdn=gospel.sunbutt.faith)](https://matrix.to/#/#mx-puppet-vk:inex.rocks?via=inex.rocks&via=sunbutt.faith)
2020-11-21 19:53:18 +00:00
2020-11-02 14:48:22 +00:00
# mx-puppet-vk
2020-11-13 02:57:21 +00:00
This is a Matrix <-> VK bridge based on [mx-puppet-bridge](https://github.com/Sorunome/mx-puppet-bridge) and [VK-IO](https://github.com/negezor/vk-io).
2020-11-02 14:48:22 +00:00
It is in early development. Right now it logs message data when log level includes "info" level.
2020-11-13 02:57:21 +00:00
Relay mode works too, but we don't recommend it.
2020-11-02 14:48:22 +00:00
## Installation
```bash
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`.
2020-11-03 13:47:02 +00:00
## Features and roadmap
- Matrix -> VK
- [x] Text content
2020-11-03 19:02:44 +00:00
- [x] Image content
- [x] Audio/Video content
- [x] Other files
2020-11-03 16:38:06 +00:00
- [x] Replies
2020-11-21 19:53:18 +00:00
- [ ] Typing notifs - [see note](#Note-on-presence-from-matrix-side)
2020-11-20 08:45:31 +00:00
- [ ] Presence - ~~not possible yet~~
- [ ] Read notifications - ~~not possible yet~~
2020-11-13 01:40:53 +00:00
- [x] Message edits
- [x] Message redacts - works as edit, real redact unavailable without being admin in chat
2020-11-03 13:47:02 +00:00
- VK -> Matrix
- [x] Text content
2020-11-20 08:45:31 +00:00
- [x] Forwards
2020-11-03 19:02:44 +00:00
- [x] Image content
2020-11-13 01:40:53 +00:00
- [x] Audio content
- [ ] Video content
- [x] Stickers
- [x] Other files
2020-11-03 16:38:06 +00:00
- [ ] Presence - not effective to track
2020-11-03 13:47:02 +00:00
- [x] Typing notifs
- [x] User profiles
2020-11-13 01:40:53 +00:00
- [ ] Read notifications - not effective to track
- [x] Message edits
- [ ] Message redacts - doesn't work
2020-11-20 15:43:14 +00:00
- Edge cases to work around
- [ ] Access token revoked on VK side
- [ ] Bot is kicked out on VK side
- Probably more, send an issue!
2020-11-03 13:47:02 +00:00
2020-11-02 14:48:22 +00:00
## Usage
2020-11-20 15:34:00 +00:00
[Video demonstration by Coma Grayce](https://youtu.be/nBRBUA9beXs)
2020-11-03 13:47:02 +00:00
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](https://github.com/Sorunome/mx-puppet-bridge#relay-mode)
### 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
```