Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Wechat with Matrix with the power of Wechaty #1737

Closed
huan opened this issue Apr 12, 2019 · 4 comments
Closed

Integrate Wechat with Matrix with the power of Wechaty #1737

huan opened this issue Apr 12, 2019 · 4 comments

Comments

@huan
Copy link
Member

huan commented Apr 12, 2019

Matrix is like Pidgin on your Phone.

Pidgin try to IM all your friends in one place in Linux, and with Matrix you can have your Phone clinet with your private server which is highly customized. Matrix did not use XMPP protocol, it's server uses REST so that it could be more easy to extend.

This week I had a great talk with YC partner Eric @ericmigi, who is a serial entrepreneur and also a geek with technology. He uses Matrix a lot and almost integrated all the instance messanger to his Matrix.

But, the matrix does not support Wechat yet. So we'd like to introduce a matrix-wechat bridge to implement the Wechat protocol, and fill the gap between Matrix and Wechat.

Currently, @ericmigi provide some links that will help us to kick off a starter, hope we could make a workable POC soon, and any contribution will be welcome.

  1. homeserver install in 1 hr
  2. examples of puppet bridges
@ericmigi
Copy link

Let's do it! :)

@huan
Copy link
Member Author

huan commented May 7, 2019

UPDATE May 7

At first, Thanks @ericmigi for introducing @tulir to me. @tulir has very rich experiences with building the matrix bridges such as:

Room / Bridge Types

According to the Matrix Bridge Documentation, there are two types of rooms:

  1. Portal rooms
  2. Plumbed rooms

and eight Types of bridges (simplest first):

  1. Bridgebot-based bridges
  2. Bot-API (aka Virtual user) based bridges
  3. Simple puppeted bridge
  4. Double-puppeted bridge
  5. Hybrid Relaybot Puppet Bridge
  6. Server-to-server bridging
  7. One-way bridging
  8. Sidecar bridge

It seems more likely the Wechaty Bot in Matrix should create Portal Rooms with the Simple Puppeted Bridge because what we want is to bring all the Wechat Conversation to the Matrix, and let the Matrix user control his account on Wechat.

Matrix Bridge SDKs

We will use a Node.js SDK because Wechaty is written in JS/TS.

There are two SDK that we can select:

  1. matrix-appservice-bridge - Bridging infrastructure for Application Services
  2. matrix-puppet-bridge - Facilitates implementation of double puppeted Matrix bridges

According to the discussion with @tulir, the matrix-puppet-bridge will be easy to use but will limitate the bridge to a single user, and the matrix-appservice-bridge will be more flexible.

So I will choose one of the two to start with, not decided yet.

Conclusion

As far as my understanding, I believe the Matrix-Wechaty-Bridge will be mostly like the Matrix-WhatsApp puppeting bridge because we also use a hacked API to communicate with WhatsApp Server, and they are all required to log in by scan a QR Code.

@ericmigi @tulir Any suggestions/comments will be welcome.

@huan huan self-assigned this May 7, 2019
@huan huan pinned this issue May 7, 2019
@huan
Copy link
Member Author

huan commented May 10, 2019

Move to wechaty/matrix-appservice#1

@lijiarui lijiarui added this to Preparing in Puppet Maker via automation Sep 8, 2019
@lijiarui lijiarui moved this from Preparing to Done in Puppet Maker Sep 8, 2019
@lijiarui lijiarui unpinned this issue Oct 16, 2019
@huan
Copy link
Member Author

huan commented Feb 26, 2020

Continue working on https://github.com/wechaty/matrix-appservice-wechaty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Puppet Maker
  
Done
Development

No branches or pull requests

2 participants