42wim / matterbridge

bridge between mattermost, IRC, gitter, xmpp, slack, discord, telegram, rocketchat, twitch, ssh-chat, zulip, whatsapp, keybase, matrix, microsoft teams, nextcloud, mumble, vk and more with REST API (mattermost not required!)
Apache License 2.0
6.67k stars 620 forks source link

Other bridges ? #28

Open 42wim opened 8 years ago

42wim commented 8 years ago

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

3rd party via matterbridge API

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

Obsolete

stp-ip commented 8 years ago

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

stp-ip commented 8 years ago

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

tobru commented 8 years ago

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

42wim commented 8 years ago

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
jleclanche commented 8 years ago

Would like to suggest discord support :) https://github.com/reactiflux/discord-irc/issues/100

42wim commented 8 years ago

@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.

lagleki commented 8 years ago

would like Telegram https://github.com/FruitieX/teleirc

42wim commented 8 years ago

@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.

thybag commented 8 years ago

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

jlsjonas commented 8 years ago

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

42wim commented 8 years ago

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

scanline77 commented 7 years ago

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 7 years ago

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

42wim commented 7 years ago

@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.

ananace commented 7 years ago

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 7 years ago

@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 7 years ago

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 :+1: to this message.

tomoeuehara commented 7 years ago

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

42wim commented 7 years ago

@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.

tomoeuehara commented 7 years ago

@42wim DM sent :D

dantrevino commented 7 years ago

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 7 years ago

@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 7 years ago

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 7 years ago

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 :-)

nickolasclarke commented 7 years ago

@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 7 years ago

@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.

TomTheDragon commented 7 years ago

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 7 years ago

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

TomTheDragon commented 7 years ago

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

42wim commented 7 years ago

@TomTheDragon it's in master now.

A couple of things:

Authentication

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 ..
jleclanche commented 7 years ago

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

42wim commented 7 years ago

@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 :-)

TomTheDragon commented 7 years ago

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

42wim commented 7 years ago

@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.

TomTheDragon commented 7 years ago

@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 7 years ago

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

dluciv commented 7 years ago

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.

MurzNN commented 7 years ago

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.

dluciv commented 7 years ago

@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 7 years ago

Is anyone working on bridging Microsoft Teams?

MurzNN commented 7 years ago

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

MurzNN commented 7 years ago

@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.

MurzNN commented 7 years ago

Here is Skype implementation in Go:

MurzNN commented 7 years ago

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 7 years ago

@MurzNN thanks for your time looking into this.

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

BFlorry commented 7 years ago

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 7 years ago

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

MurzNN commented 7 years ago

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

BFlorry commented 7 years ago

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

jleclanche commented 7 years ago

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...