Comments (8)
You don't need 4 gateways for your setup, you can do it with 2 gateways.
gateway.in
specifies the incoming bridges, gateway.out
the outgoing bridges.
Messages coming from any incoming bridge will be sent to any outgoing bridge.
The config is a bit verbose, but it's not easy to have something flexible and not too complicated in the code.
It's based on the config in #9 the unfortunately inline tables are not yet in the go-tom library which would make it less verbose like { account = "gitter.hsimbot", channel = "hearthsim/hearthsim" },
[[gateway]]
name="gateway-wellington"
enable=true
[[gateway.in]]
account="slack.enspiral"
channel="wellington"
[[gateway.in]]
account="mattermost.enspiral"
channel="wellington"
[[gateway.out]]
account="slack.enspiral"
channel="wellington"
[[gateway.out]]
account="mattermost.enspiral"
channel="wellington"
[[gateway]]
name="gateway-thanks"
enable=true
[[gateway.in]]
account="slack.enspiral"
channel="thanks"
[[gateway.in]]
account="mattermost.enspiral"
channel="thanks"
[[gateway.out]]
account="slack.enspiral"
channel="thanks"
[[gateway.out]]
account="mattermost.enspiral"
channel="thanks"
Your suggestion with bidirectionalbridge
would only work when the channels on slack and mattermost have exactly the same name.
from matterbridge.
Thanks for explaining that to me. Super helpful. I really appreciate it.
In my case, I'm trying to create a way for us to migrate from slack to matterbridge, and it's fine to assume that channel names will be exactly the same on both systems. I have been thinking that this must be the case for many people in my situation, but it does not seem like there is a clear guide for people to follow yet. It must be my job to write it up!
So.. I've got maybe 100 channels across 5 teams, with the same channel and team name in each place.
Having concise and readable configuration is my top concern for managing this complexity.
At this stage I think the easiest thing for me to do is write a ruby script which generates a matterbridge config based on my more concise configuration file.
Maybe after I understand my configuration needs I can look at what the right contribution to matterbridge is to help others in my situation.
from matterbridge.
@robguthrie I implemented a simplified config for your use case.
It's called the "samechannelgateway" by lack of a better name. (I didn't like bidirectional because they all are bidirectional. A better name is still welcome though)
Your config would be simplified like this:
[[samechannelgateway]]
name = slackmattermost
enable = true
accounts = [ "mattermost.enspiral","slack.enspiral" ]
channels = [ "wellington", "thanks"]
It's in master now, just tested by me. If you have the time, more testing would be appreciated :-)
from matterbridge.
Wow! That's fantastic. I'll give it a go tomorrow. Thank you!
On Sat, Oct 1, 2016 at 10:24 AM, @42wim [email protected] wrote:
@robguthrie https://github.com/robguthrie I implemented a simplified
config for your use case.
It's called the "samechannelgateway" by lack of a better name. (I didn't
like bidirectional because they all are bidirectional. A better name is
still welcome though)Your config would be simplified like this:
[[samechannelgateway]]
name = slackmattermost
enable = true
accounts = [ "mattermost.enspiral","slack.enspiral" ]
channels = [ "wellington", "thanks"]It's in master now, just tested by me. If you have the time more testing
would be appreciated :-)—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#35 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAdr33T-y65mgubvG2txbwxGrA97mIqYks5qvX4YgaJpZM4KGBB-
.
from matterbridge.
Hi. I had a go with this but I get the following stack trace when I start it:
matterbridge_1 | running version 0.7.0-dev
matterbridge_1 | starting samechannel gateway "slackmattermost"
matterbridge_1 | time="2016-10-02T23:37:15Z" level=info msg="Starting bridge: mattermost.enspiral"
matterbridge_1 | time="2016-10-02T23:37:15Z" level=info msg="Starting bridge: slack.enspiral"
matterbridge_1 | time="2016-10-02T23:37:15Z" level=info msg="Connecting [email protected] (team: Enspiral) on chat.enspiral.com" module=mattermost
matterbridge_1 | time="2016-10-02T23:37:16Z" level=info msg="mattermost.enspiral: joining wellington"
matterbridge_1 | panic: runtime error: invalid memory address or nil pointer dereference
matterbridge_1 | [signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x7f408764a546]
matterbridge_1 |
matterbridge_1 | goroutine 6 [running]:
matterbridge_1 | panic(0x7f4087c3c1c0, 0xc42000c050)
matterbridge_1 | /usr/lib/go/src/runtime/panic.go:500 +0x1a5
matterbridge_1 | github.com/42wim/matterbridge/matterclient.(*MMClient).GetChannelId(0xc420081830, 0xc4200f9740, 0xa, 0x0, 0x0, 0x0, 0x0)
matterbridge_1 | /go/src/github.com/42wim/matterbridge/matterclient/matterclient.go:318 +0xa6
matterbridge_1 | github.com/42wim/matterbridge/bridge/mattermost.(*Bmattermost).JoinChannel(0xc420103420, 0xc4200f9740, 0xa, 0x2, 0x2)
matterbridge_1 | /go/src/github.com/42wim/matterbridge/bridge/mattermost/mattermost.go:88 +0x6a
matterbridge_1 | github.com/42wim/matterbridge/gateway/samechannel.New(0xc420018ae0, 0xc420011400, 0x0, 0x0)
matterbridge_1 | /go/src/github.com/42wim/matterbridge/gateway/samechannel/samechannel.go:35 +0x4fe
matterbridge_1 | main.main.func1(0xc420018ae0, 0xc42012c000, 0xf, 0x1, 0xc42012ccc0, 0x2, 0x2, 0xc42012cba0, 0x2, 0x2)
matterbridge_1 | /go/src/github.com/42wim/matterbridge/matterbridge.go:40 +0x84
matterbridge_1 | created by main.main
matterbridge_1 | /go/src/github.com/42wim/matterbridge/matterbridge.go:44 +0x5c5
Here is my config:
[mattermost]
[mattermost.enspiral]
useAPI=true
Server="removed"
Team="Enspiral"
Login="removed"
Password="removed"
# PrefixMessagesWithNick=true
[slack]
[slack.enspiral]
useAPI=true
Token="removed"
[[samechannelgateway]]
name="slackmattermost"
enable=true
accounts=[ "mattermost.enspiral","slack.enspiral" ]
channels=[ "wellington", "thanks"]
I really appreciate your help. Thank you.
from matterbridge.
Could you update from master again ? My guess is your team can not be found (should be in lowercase)
from matterbridge.
I've got it setup now. It's been running for a few hours now and seems great.
Thank you so much!
I have another ... idea.. Could the system automatically sync channels the bot belongs to? So I don't need to update and restart the config, rather, I just invite the bot to the channel in each system?
from matterbridge.
Could you open an issue for that idea ? And close this issue afterwards ?:)
Thanks!
from matterbridge.
Related Issues (20)
- Mattermost: SendMessage failed: Unsupported start tag HOT 2
- Bridge discord account instead of servers
- sending from slack to discord corrupts content of the message
- Discord bridge does not delete messages when using webhooks HOT 1
- KeepQuotedReply=true breaks bridging messages from Matrix HOT 1
- use Telegram's updateDeleteMessages to propagate message deletion
- XMPP New Line EOF
- No direct tls connection to xmpp server
- Starting gateway failed: Bridge discord.account failed to start: HTTP 401 Unauthorized HOT 3
- Add support for bot shutdown/maintenance message
- Support message retraction for XMPP HOT 1
- Forwarded image from Telegram doesn't show link on IRC and XMPP HOT 1
- We need a Discord moderator in the Discord support chat HOT 1
- Consider updating go-xmpp HOT 1
- SendMessage failed: Too Many Requests: retry after 22
- Telegram: message caption is too long
- Hosted relay: please add your official XMPP MUC to the bridge
- Show nickname in IRC HOT 1
- WhatsApp messages are lost.
- Hello, I have a problem when running the matterbridge system service
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matterbridge.