Skip to content

Add Matterbridge #3

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

Merged
merged 2 commits into from
Oct 13, 2021
Merged

Add Matterbridge #3

merged 2 commits into from
Oct 13, 2021

Conversation

vinhbhn
Copy link
Contributor

@vinhbhn vinhbhn commented Oct 6, 2021

  1. Research the proper software to bridge Matrix-Discrod bridge
  • Two way message bridging
  • Can simulate the user name and avatar on the both side
  • Can be deployed to a Kubernetes cluster
  • Can expose the basic monitoring metrics
  1. Document the detailed deployment guide, including how to:
  • set up the bot accounts
  • config the software
  • deploy to production

I can't create @__discord__ because it runs on synapse. You have to install synapse on the server and run matrix-appservice-discord or mx-puppet-discord.

@h4x3rotab
Copy link
Contributor

Will review soon!

@h4x3rotab
Copy link
Contributor

h4x3rotab commented Oct 11, 2021

Hello. I have a few questions:

  1. What is @discord ?
  2. Does it require to configure a server with host and HTTPS certificate?
  3. How do we monitor it?
  4. Does avatar impersonating works?

@vinhbhn
Copy link
Contributor Author

vinhbhn commented Oct 12, 2021

  1. @__discord__bot is generated on matrix chat. It runs on Synapse. Synapse as a node because Matrix is decentralized social network.
  2. Yes. It runs on a (vps) server ( + domain ). It requires HTTPS/SSL certificate.
  3. You can use Prometheus/Grafana to monitor it.
  4. Yes. It works just like t2bot.io.

Note: Synapse is not related to Matterbridge.

@h4x3rotab
Copy link
Contributor

It's a bit unclear. Synapse is the matrix node. In my understanding it's usually used when we want to create our own matrix server (with our own domain). If we are using the matrix.io hosted server, do we still need to run Synapse? If yes, is it for getting some advanced API for the bridge bots?

@vinhbhn
Copy link
Contributor Author

vinhbhn commented Oct 13, 2021

That's right. But to do the message bridge, username and avatar impersonating task, you need a service called matrix-appservice-discord (or mx-puppet-discord), configuring them requires a homeserver other than matrix.org. That means you have to run synapse on your domain. It works the same functions as the t2bot.io you are using.

@h4x3rotab
Copy link
Contributor

h4x3rotab commented Oct 13, 2021

AFAIK t2bot.io supports the matriox.org domain. So I guess we have missed something here, or probably t2bot can somehow run a homeserver on matrix.org.

@vinhbhn
Copy link
Contributor Author

vinhbhn commented Oct 13, 2021

I see @__discord__bot:t2bot.io when I add t2bot to my matrix room. So I understand that the homeserver that t2bot is using is t2bot.io.
Screenshot from 2021-10-13 11-40-42

@h4x3rotab
Copy link
Contributor

Ahhh, I got it. So it creates impersonate accounts on-the-fly on their homeserver. Okay now it makes a lot of sense. Thanks!

Btw, have you tried to configure a homeserver for that? And there's no additional config required for impersonate account on Discord, right?

@vinhbhn
Copy link
Contributor Author

vinhbhn commented Oct 13, 2021

AFAIK Matterbridge is just a messaging bridge, it cannot spoof usernames and avatars on matrix rooms.
It means you have two options:

  1. Matterbridge
  2. Synapse + a matrix service that I told you on the above (and here it means we are preparing to create an identical version of t2bot).

Below are pictures when I used matterbridge. It can display username and avatar from matrix to discord.
Screenshot from 2021-10-13 11-29-05
Screenshot from 2021-10-13 11-29-03

@vinhbhn
Copy link
Contributor Author

vinhbhn commented Oct 13, 2021

Ahhh, I got it. So it creates impersonate accounts on-the-fly on their homeserver. Okay now it makes a lot of sense. Thanks!

Btw, have you tried to configure a homeserver for that? And there's no additional config required for impersonate account on Discord, right?

I think you don't need to worry about spoofing usernames and avatars from other social networks to discord because discord supports that via discord webhook.

@h4x3rotab
Copy link
Contributor

Thanks a lot. I'm glad to announce the PR is accepted. I'm going to payout the bounty in 3 days. Note that there's an ongoing PR on Gitcoin side to fix the DOT payment issue. If it cannot be merged in time, I will send it out manually.

@h4x3rotab h4x3rotab merged commit 89ed624 into Phala-Network:main Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants