You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
matterbridge/README.md

175 lines
5.6 KiB
Markdown

# matterbridge
7 years ago
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/42wim/matterbridge) [![Join the IRC chat at https://webchat.freenode.net/?channels=matterbridgechat](https://img.shields.io/badge/IRC-matterbridgechat-green.svg)](https://webchat.freenode.net/?channels=matterbridgechat) [![Discord](https://img.shields.io/badge/discord-matterbridge-green.svg)](https://discord.gg/AkKPtrQ) [![Matrix](https://img.shields.io/badge/matrix-matterbridge-green.svg)](https://riot.im/app/#/room/#matterbridge:matrix.org)
8 years ago
![matterbridge.gif](https://s15.postimg.org/qpjhp6y3f/matterbridge.gif)
7 years ago
Simple bridge between Mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, Rocket.Chat, Hipchat(via xmpp) and Matrix with REST API.
# Table of Contents
* [Features](#features)
* [Requirements](#requirements)
* [Installing](#installing)
* [Binaries](#binaries)
* [Building](#building)
* [Configuration](#configuration)
* [Examples](#examples)
* [Running](#running)
* [Docker](#docker)
* [Changelog](#changelog)
* [FAQ](#faq)
* [Thanks](#thanks)
# Features
* Relays public channel messages between multiple mattermost, IRC, XMPP, Gitter, Slack, Discord, Telegram, Rocket.Chat, Hipchat (via xmpp) and Matrix. Pick and mix.
7 years ago
* Matterbridge can also work with private groups on your mattermost/slack.
* Allow for bridging the same bridges, which means you can eg bridge between multiple mattermosts.
* The bridge is now a gateway which has support multiple in and out bridges. (and supports multiple gateways).
7 years ago
* REST API to read/post messages to bridges (WIP).
8 years ago
7 years ago
# Requirements
Accounts to one of the supported bridges
* [Mattermost](https://github.com/mattermost/platform/) 3.5.x - 3.7.x
7 years ago
* [IRC](http://www.mirc.com/servers.html)
* [XMPP](https://jabber.org)
* [Gitter](https://gitter.im)
* [Slack](https://slack.com)
* [Discord](https://discordapp.com)
* [Telegram](https://telegram.org)
* [Hipchat](https://www.hipchat.com)
* [Rocket.chat](https://rocket.chat)
* [Matrix](https://matrix.org)
# Installing
## Binaries
Binaries can be found [here] (https://github.com/42wim/matterbridge/releases/)
7 years ago
* Latest release [v0.10.1](https://github.com/42wim/matterbridge/releases/latest)
7 years ago
## Building
Go 1.6+ is required. Make sure you have [Go](https://golang.org/doc/install) properly installed, including setting up your [GOPATH] (https://golang.org/doc/code.html#GOPATH)
```
cd $GOPATH
9 years ago
go get github.com/42wim/matterbridge
```
You should now have matterbridge binary in the bin directory:
```
$ ls bin/
matterbridge
```
7 years ago
# Configuration
* [matterbridge.toml.sample](https://github.com/42wim/matterbridge/blob/master/matterbridge.toml.sample) for documentation and an example.
* [matterbridge.toml.simple](https://github.com/42wim/matterbridge/blob/master/matterbridge.toml.simple) for a simple example.
## Examples
### Bridge mattermost (off-topic) - irc (#testing)
```
[irc]
[irc.freenode]
Server="irc.freenode.net:6667"
Nick="yourbotname"
[mattermost]
[mattermost.work]
useAPI=true
Server="yourmattermostserver.tld"
Team="yourteam"
Login="yourlogin"
Password="yourpass"
PrefixMessagesWithNick=true
[[gateway]]
name="mygateway"
enable=true
[[gateway.inout]]
account="irc.freenode"
channel="#testing"
[[gateway.inout]]
account="mattermost.work"
channel="off-topic"
```
### Bridge slack (#general) - discord (general)
```
[slack]
7 years ago
[slack.test]
useAPI=true
7 years ago
Token="yourslacktoken"
PrefixMessagesWithNick=true
[discord]
7 years ago
[discord.test]
Token="yourdiscordtoken"
Server="yourdiscordservername"
[general]
RemoteNickFormat="[{PROTOCOL}/{BRIDGE}] <{NICK}> "
[[gateway]]
name = "mygateway"
enable=true
[[gateway.inout]]
account = "discord.test"
channel="general"
[[gateway.inout]]
account ="slack.test"
channel = "general"
```
# Running
1) Copy the matterbridge.toml.sample to matterbridge.toml in the same directory as the matterbridge binary.
2) Edit matterbridge.toml with the settings for your environment.
3) Now you can run matterbridge. (```./matterbridge```)
```
Usage of ./matterbridge:
-conf string
config file (default "matterbridge.toml")
-debug
enable debug
-version
show version
```
7 years ago
## Docker
Create your matterbridge.toml file locally eg in ```/tmp/matterbridge.toml```
```
docker run -ti -v /tmp/matterbridge.toml:/matterbridge.toml 42wim/matterbridge
```
7 years ago
# Changelog
See [changelog.md](https://github.com/42wim/matterbridge/blob/master/changelog.md)
7 years ago
# FAQ
7 years ago
Please look at [matterbridge.toml.sample](https://github.com/42wim/matterbridge/blob/master/matterbridge.toml.sample) for more information first.
7 years ago
## Mattermost doesn't show the IRC nicks
8 years ago
If you're running the webhooks version, this can be fixed by either:
* enabling "override usernames". See [mattermost documentation](http://docs.mattermost.com/developer/webhooks-incoming.html#enabling-incoming-webhooks)
* setting ```PrefixMessagesWithNick``` to ```true``` in ```mattermost``` section of your matterbridge.toml.
8 years ago
7 years ago
If you're running the API version you'll need to:
* setting ```PrefixMessagesWithNick``` to ```true``` in ```mattermost``` section of your matterbridge.toml.
8 years ago
Also look at the ```RemoteNickFormat``` setting.
7 years ago
# Thanks
Matterbridge wouldn't exist without these libraries:
* discord - https://github.com/bwmarrin/discordgo
* echo - https://github.com/labstack/echo
* gitter - https://github.com/sromku/go-gitter
* irc - https://github.com/thoj/go-ircevent
* mattermost - https://github.com/mattermost/platform
* matrix - https://github.com/matrix-org/gomatrix
* slack - https://github.com/nlopes/slack
* telegram - https://github.com/go-telegram-bot-api/telegram-bot-api
* xmpp - https://github.com/mattn/go-xmpp