42wim/matterbridge

Other bridges ?

42wim opened this issue ยท 147 comments

42wim commented

If anyone wants to contribute code to support for a new bridge, feel free to open an issue about this.
I'll be glad to help you where possible.

Bridges supported

Not supported anymore

  • Steam: Upstream library has no support for steam chat anymore. See here for more info.

3rd party via matterbridge API

  • Minecraft
  • Facebook Messenger
  • Reddit
  • Discourse
  • Counter-Strike, half-life and more

Not going to be implemented by me, but PR's welcome

Obsolete

Currently supported: IRC, mattermost, gitter, xmpp
Next in line: slack
To be considered: whatsapp, fb messenger, mail

Sidenote:
Awesome project and thanks for taking the time and publishing it openly.

tobru commented

Support for Rocket.Chat would be great. See https://github.com/RocketChat/Rocket.Chat

42wim commented

Thanks for the feedback.
I'm also trying to make the config more flexible to combine multiple bridges in a gateway, more or less like the example in issue #9

Any comments ?

[Bridge "mattermost1"]
protocol=mattermost
..mattermostoptions..

[Bridge "irc1"]
protocol=irc
..ircoptions..

[Bridge "irc2"]
protocol=irc
..ircoptions..

[Bridge "gitter1"]
protocol=gitter
..gitteroptions..

[Channel "test"]
mattermost="testing"
irc="#test"

[Channel "stuff"]
mattermost="general"
irc="#stuff"
gitter="42wim/stuff"

[Gateway "gateway1"]
bridge=mattermost1
bridge=irc1
channel=test
enable

[Gateway "test2"]
bridge=mattermost1
bridge=irc2
bridge=gitter1
channel=stuff
enable

Would like to suggest discord support :) reactiflux/discord-irc#100

42wim commented

@jleclanche well, discord support has just been added in current master ;-)
Also decided to use your TOML configuration file because gcfg was not expressive enough.

42wim commented

@lagleki unfortunately telegram needs a phone-number to join (and I'm not willing to give mine). On the other hand the bot API is implemented in Go, so it would be quite easy to add it.

If you're willing to be my test-user I can try to add it.

Unsure how easy it'd be to add, but being able to bridge to hipchat would be a nice to have.

@42wim I'll gladly offer myself for that (telegram), might even (if I find enough spare time) send a PR

42wim commented

@jlsjonas thanks! Please let me know the results in #80

Would be really nice to see mattermost to Skype group chat. Sameroom.io offers this as service so I imagine they are using Microsoft's API. This would be worth making a donation on its own.

42wim commented

@tobru rocket.chat support got just added, feedback welcome :-)

42wim commented

@pgladwin seems that there's a rest API for skype on https://docs.botframework.com/en-us/skype/chat/
That's good news, no .net SDK needed.

Could a possible additional bridge to add be Matrix?

There are several already existing bridges and an Application Service API spec. (Though admittedly it's still marked as unstable)

42wim commented

@Ace13 matrix support added in master :-)
For channel names you'll have to use the room internal ID (looks like !QJFqjsGJwmQzbuBfff:matrix.org)
You'll also need a dedicated bot user to avoid loops.

So for example

[matrix.test]
Server="https://yourhomeserver" (e.g. https://matrix.org)
Login="yourlogin"
Password="yourpass"
[[gateway]]
  enable=true
  [[gateway.inout]]
  account="matrix.test"
  channel="!QJFqjsGJwmQzbuBfff:matrix.org"

 [[gateway.inout]]
 ..your other bridges ..
42wim commented

Got a question for Let's chat support (https://github.com/sdelements/lets-chat) but it seems quite dead to me. If you want this bridge added, please add the ๐Ÿ‘ to this message.

Line. It already has an API support in Go language too! ๐Ÿ˜‰
https://devdocs.line.me/en/?go#messaging-api

42wim commented

@tomoeuehara looks interesting, but signup unfortunately only works with phonenumber.

I'm willing to accept PR's for this protocol, or if someone sends me a test login/password (DM @42wim on twitter) I can take a look myself.

@42wim DM sent :D

If you do something like this:
[Channel "stuff"]
mattermost="general"
irc="#stuff"
gitter="42wim/stuff"

How will you know where your reply is going? If someone pings me on irc #stuff i dont want my replies going to gitter.

42wim commented

@dantrevino That example was an old proposal, like you say it has some issues.

An example of the current configuration can be found in the README: https://github.com/42wim/matterbridge/#examples or sample config
https://github.com/42wim/matterbridge/blob/master/matterbridge.toml.simple

Tck13 commented

Dear @42wim,

Your tube system looks exact what we need, only is the integration with skype something we would like to see.

It's on your list at the top, so can you give something of an status? Does it comes in an few days, weeks, months or was it only an idea and have you no plans to relize this idea?

42wim commented

hi @Tck13

Thank you for your interest.

Skype doesn't have a go library, so I'll need to implement a lot myself (or wait until such a library pops up).
Which only could happen when I have a lot of free time, maybe july/august.

So sorry, but unless someone else implements it, it won't be available soon. (and I don't make any promises for july/august :-)

@42wim Wechat Enterprise ไผไธšๅพฎไฟก would be excellent! Most of these services are blocked and/or unusable here in China for various reasons, but wechat Enterprise is severely lacking. I was hoping to write a bridge between our slack org and wechat so that our foreign teams can use slack and our chinese teams can use wechat, but then I found this excellent project. Unfortunately I have no Go experience.

There does seem to be two different libraries, (https://github.com/chanxuehong/wechat.v2/ and https://github.com/chanxuehong/wechat) but my understanding of Go and chinese is too poor to really dig in and try to figure it out myself. However, I do know that Wechat enterprise ไผไธšๅพฎไฟก has a robust API, with full support for incoming and outgoing webhooks:

http://qydev.weixin.qq.com/wiki/index.php?title=%E9%A6%96%E9%A1%B5

A long shot, but let me know what you think.

42wim commented

@nickolasclarke Thanks for the suggestion.

I see a couple of issues unfortunately.

  1. documentation is too much chinese for me.
  2. it needs a signup with a mobile phone. (I don't want to use this kind of service, so I can't test it)
  3. wechat seems to have a lot of red tape for creating and testing accounts.

So this is not something I'm going to implement, but I'm happy to accept code from someone for who those 3 things aren't an issue.

How about Steam and TOX support?

I am not sure if they would work but thats the two go-libs i found so far:
Steam --> https://github.com/Philipp15b/go-steam
TOX --> https://github.com/kitech/go-toxcore

42wim commented

@TomTheDragon steam looks feasible, got a poc running :-) You willing to test soon ?:)
Haven't looked into tox yet

@42wim sure, i really would like to test it :)

42wim commented

@TomTheDragon it's in master now.

A couple of things:

Authentication

  • I only have it tested with 2FA enabled. If you have 2FA steamguard enabled you'll get a prompt to type in the 2FA code in when matterbridge starts.
  • Authcode by mail should also work, you can add that in the config or you'll get a prompt too. (not tested)
  • No steamguard enabled should just work. (not tested)
  • It works fine with your own account, but you better make a separate bot account if you really want to use this.

Channels

You cannot use channel names, you'll have to use the channel/chatids, a long number that you can find in the URL of your browser if you click on "enter this chat" room on a group page.

Please open a new issue for feedback/issues with the steam bridge.

[steam]
[steam.gamechat]
#login/pass of your bot.
#Use a dedicated user for this and not your own account!
#REQUIRED
Login="yourlogin"
Password="yourpass"

#steamguard mail authcode (not the 2FA code)
#OPTIONAL
Authcode="ABCE12"
[[gateway]]
  enable=true
  [[gateway.inout]]
  account="steam.gamechat"
  channel="12345678912345678"

 [[gateway.inout]]
 ..your other bridges ..

@42wim seriously your ability to produce/hook up gateway after gateway really astounds me.

42wim commented

@jleclanche thanks for the kind words, but the hard work is mostly done by the creators of the different libraries. I'm doing the easy part :-)

@42wim
Steam works perfectly like it should, thx again :)
Had any luck with TOX so far?

42wim commented

@TomTheDragon ok, nice to hear.

I've been looking into TOX, it seems still early (alpha releases) and it doesn't have pure go libraries.
So I'm not going to add it, but I'm open for PR if someone else wants to do this.

@42wim
Hm.. ok then, would be really cool to see TOX support one day, since TOX is an really interesting and really great working (open) p2p/serverless protocol ;)

But how about Hangouts? I could not find any pure Hangouts go libs so far but maybe you can work with the Hangouts client they use in the Slangouts project? --> https://github.com/gpavlidi/slangouts

42wim commented

@TomTheDragon Yes, I looked into the hangouts thing a while ago.
But it has some issues:

  • I couldn't get it to work with my test account
  • After looking into the code I saw it uses a dirty hack where I'm not comfortable with, see rogora/hangish#28

Actually, Skype will be very desired.

May be it will even help more people to give up Skype finally %)

Skype doesn't have a go library, so I'll need to implement a lot myself (or wait until such a library pops up).

Haven't check it myself, but it looks like there is a sort of.

For Skype bridging you can lookup code of https://github.com/EionRobb/skype4pidgin/tree/master/skypeweb project - it works with skype directly via web API.

@MurzNN It is probably better to use third party library than to re-implement it for this project.

Rationale:

It is not official API and there is a big chance, it will change like ICQ protocol in late 2000-th. In the sme time, @42wim already does a lot of work integrating all the protocols together.

sapg commented

Is anyone working on bridging Microsoft Teams?

Vk.com is popular instant messaging service, based on social network, like Facebook.com.

Will be good to create mattermost bridge to it. The API must be almost same as in Facebook social network.

Here is projects that implement API librarites for Vkontakte:

And more via vk keyword: https://golanglibs.com/top?q=vk

@dluciv here is third party node.js library for skype: https://github.com/ocilo/skype-http There are already Matrix bridge that work based on this library: https://github.com/matrix-hacks/matrix-puppet-skype
I'll try to find go implementation of it for mattermost.

Another suggestion is add support for libpurple library: libpurple project provide good API for work with many instant messaging services via one interface: https://developer.pidgin.im/wiki/WhatIsLibpurple

libpurple library already have plugins to many instant messaging services (XMPP, Telegram, Skype, etc), here is list of supported networks via plugins: https://developer.pidgin.im/wiki/ThirdPartyPlugins

So implementing support for libpurple library will add bridge ability to many networks at once.

42wim commented

@MurzNN thanks for your time looking into this.

  • vk: haven't looked into it yet, may be possible (on my list to look at later)
  • skype: the 2 skype implementations in go you found are prototype/pocs and not usable
  • libpurple: there's a WIP for a purple go library https://github.com/kitech/go-purple but using this means using cgo and this won't work on windows. But if anyone wants to implement this, I'll merge that PR

@sapg AFAIK no one is looking into microsoft teams. To add this I need a go library or someone implementing this themselves.

What would you think of RSS support? It would help with having only one bot doing all the bridging. I don't know if RSS output would be useful - maybe? At least RSS input, as with that you could get all the feeds you need in any chat matterbridge supports.

42wim commented

@BFlorry I'm not sure how you see RSS, you want to poll a RSS feed and dump this info in a channel?

Yes, RSS is good idea - poll RSS feed and post new articles to IM channels. Matrix.org IM have this feature via bot https://github.com/matrix-org/go-neb#user-content-rss-bot

@42wim Yes, exactly. @MurzNN defined this better than me.

That really sounds out of scope for matterbridge; the primary feature of the bridges being that they are 2-ways.

OTOH it makes a good case for a plugin system...

42wim commented

Yes, that's out of scope.
I'm not sure of a plugin system either, I have a basic API that can be used for this.
@NikkyAI was creating a bot based on this https://github.com/NikkyAI/pyCord

I'm open for feedback on the API

Will be good to see also bridge to Viber IM network - it have Bots and useful API https://developers.viber.com/docs/api/
And here https://github.com/strongo/bots-api-viber is Go library that implements it.

Speaking of bot framework's rest api, support for that would allow support for:

  • skype
  • WeChat
  • facebook
  • groupme
  • web chat (custom bot framework chat tool)

https://docs.botframework.com/en-us/channel-inspector/channels/Facebook?f=GroupChat&e=example1

42wim commented

Updated the initial message to summarize my answers about different bridges/protocols

42wim commented

sshchat (https://github.com/shazow/ssh-chat) support added

Threema is an widely used messenger, which also seems to have an open-source implementation on github --> https://github.com/o3ma

Via https://github.com/strongo/bots-framework on Go language - we can easily add support for many messengers in once: Telegram, Facebook Messenger, Viber, Skype, Line, Kik, WeChat
@42wim, can you lookup how hard to add this framework in matterbridge?

42wim commented

Added twitch support explicitly to the list (but it's just irc)

Mumble support (of course only its text chat) would be a really nice feature, and a go library already seems to exist: https://github.com/layeh/gumble

Facebook Messenger would be cool.

would there be support for creating a stub issue for each platform? that way, ppl can +1 and track updates and convo around the ones they care about, rather than a mega-thread? This thread could be converted into an epic that links the others from the OP

particularly interested in your perspective, @42wim

Potential To Dos

  • create a label: new-bridge-request
  • Create a stub for each bridge type (maybes and not-by-me's) and tag with label
    • cc people who expressed interest in this thread
    • copy relevant comments about libraries, etc.
  • edit original (summary) post in here to reference each issue
42wim commented

That would create a lot of "low traffic" issues I think.
I try to keep the first comment updated with the current state.
Of course if the chatter in this thread would explode for a specific bridge, another issue can be opened.

42wim commented

@jheiselman started working on Zulip, poc works. I hope you're willing to test the final version in a few days :)

42wim commented

Zulip support has been added ๐ŸŽ‰

Skype would be pretty sweet. If someone wanted to tackle it and create an issue for it, I wouldn't mind tossing some cash on Bountysource or something for it.

@54 Skype represents a unique pain point. There is no official API and the only SDK has to use the Microsoft's BotFramework platform. Further, their SDK is C# or Node.js only. Someone would have to take time to port it to Go.

I have found fresher libraries for Viber in Go:

Also for Facebook: https://github.com/strongo/bots-api-fbm

And for VK:

@42wim If we don't plan to create separate issue for each messenger, can you update first message and add links to libraries for messengers, mentioned here?

42wim commented

@MurzNN thanks for the update. I've added those. Facebook isn't an option though because it doesn't seem to support group chat for bots.

lil5 commented
  • signal - no golang library. PR welcome

There is a Go Signal library: https://github.com/RadicalApp/libsignal-protocol-go
Although it is a bit old ( Latest commit d09bcab on Apr 14, 2017 )

lil5 commented

As @jheiselman explains:

[discord] lil5: I took a look at that go library for libsignal-protocol-go and it only covers the encryption method, not the service API

- taken from the matterbridge chat

@nickolasclarke I am author of vim-chat which support qq and weechat, and I would like to help test this two lib.

and I think you can also check mojo-webqq and mojo-weixin which are perl lib for qq and weechat.

For WeChat we can also lookup https://github.com/littlecodersh/ItChat project in Go lang.

FYI, Seems ppl are working on a tox fork: https://github.com/envsh/matterbridge

Asked about upstreaming here: envsh/matterbridge#24

cc @TomTheDragon

@Jaykul suggested Spectrum: #628

It's a little different model than most, but it feels worth tracking. I can imagine a Zulip/Spectrum gateway feeling very natural to someone who prefers both.

42wim commented

Thanks to @KrzysztofMadejski the Whatsapp protocol is now supported.

There is this golang implementation for the signal protocol:
https://github.com/morph027/textsecure

It is used by this gateway project:
https://gitlab.com/morph027/signal-web-gateway

According to the issues it seems to be working.

poVoq commented

Not a general purpose golang library, but this could probably help getting a Microsoft Teams bridge to work:
https://github.com/bzon/prometheus-msteams

42wim commented

Thanks to @hyperobject keybase bridging is now possible.

Checked the Viber API, seems have they doesn't supports receiving messages, only sending.

42wim commented

I've started working on Microsoft Teams support.
Looking for alpha/beta testers who have an active Teams (not just a test setup)
I'll open a new issue for further discussion about msteams if there are actually people with active setups who want to help test it.

@42wim I'll gladly participate in testing msteams, we do (unfortunately) have a active msteams setup.

42wim commented

@gardar what's the best way to contact you? If you're on twitter you can dm @42wim

@42wim probably best to reach me @gardar on freenode

poVoq commented

There is this golang implementation for the signal protocol:
https://github.com/morph027/textsecure

More up to date version seems to be this:
https://github.com/nanu-c/textsecure/

QQ support could be interesting, it would create access to chinas number one messaging network ;)
https://github.com/catsworld/qq-bot-api

signal - no golang library. PR welcome

it seems like there are some by now :) https://github.com/RadicalApp/libsignal-protocol-go
anyone willing to do some work?

Great work. Could it be possible to have bridge to Microsoft Teams as well? Teams seems to get populair and I have seen teams integrations with slack as well

42wim commented

@pdwonline msteams support will be available in 1.17.x, you can try the PR here: #967

Threema support would be awesome.

Signal would be awesome!

poVoq commented

This might be a Go based library for a Nextcloud Talk bot:
https://github.com/pojntfx/nextcloud-talk-jitsi-bot

poVoq commented

Threema support would be awesome.

Could be a start, but apparently something changed in Threema and it stopped working:
https://github.com/genofire/thrempp

An RSS/Atom feed?

qarth commented

What about Wickr?

poVoq commented

Mozilla Hubs VR chat would be cool. https://hubs.mozilla.com/

There is a Golang based WIP bot-bridge to Matrix that might be a good starting point:
https://gitlab.com/rek2/gohubsbot

would be nice to support for email

QQ support could be interesting, it would create access to chinas number one messaging network ;)
https://github.com/catsworld/qq-bot-api

Any updates on this maybe? I can help if there is some testing that needs to be done.

42wim commented

Forgot to update this issue:

  • Nextcloud Talk has been added in 1.18.0 - thanks to @gary-kim
  • Mumble has just been added - thanks to @s3lph