mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-06-27 00:39:26 +00:00
Compare commits
3 Commits
v1.0.0-rc1
...
v1.0.0
Author | SHA1 | Date | |
---|---|---|---|
ad4d461606 | |||
67905089ba | |||
f2483af561 |
@ -53,7 +53,7 @@ See https://github.com/42wim/matterbridge/wiki
|
||||
|
||||
# Installing
|
||||
## Binaries
|
||||
* Latest stable release [v1.0.0-rc1](https://github.com/42wim/matterbridge/releases/latest)
|
||||
* Latest stable release [v1.0.0](https://github.com/42wim/matterbridge/releases/latest)
|
||||
* Development releases (follows master) can be downloaded [here](https://dl.bintray.com/42wim/nightly/)
|
||||
|
||||
## Building
|
||||
|
@ -77,6 +77,7 @@ type Protocol struct {
|
||||
UseSASL bool // IRC
|
||||
UseTLS bool // IRC
|
||||
UseFirstName bool // telegram
|
||||
UseUserName bool // discord
|
||||
UseInsecureURL bool // telegram
|
||||
WebhookBindAddress string // mattermost, slack
|
||||
WebhookURL string // mattermost, slack
|
||||
|
@ -114,18 +114,14 @@ func (b *bdiscord) Send(msg config.Message) error {
|
||||
flog.Errorf("Could not find channelID for %v", msg.Channel)
|
||||
return nil
|
||||
}
|
||||
if msg.Event == config.EVENT_USER_ACTION {
|
||||
msg.Text = "_" + msg.Text + "_"
|
||||
}
|
||||
if b.Config.WebhookURL == "" {
|
||||
flog.Debugf("Broadcasting using token (API)")
|
||||
if msg.Event == config.EVENT_USER_ACTION {
|
||||
msg.Username = "_" + msg.Username
|
||||
msg.Text = msg.Text + "_"
|
||||
}
|
||||
b.c.ChannelMessageSend(channelID, msg.Username+msg.Text)
|
||||
} else {
|
||||
flog.Debugf("Broadcasting using Webhook")
|
||||
if msg.Event == config.EVENT_USER_ACTION {
|
||||
msg.Text = "_" + msg.Text + "_"
|
||||
}
|
||||
b.c.WebhookExecute(
|
||||
b.webhookID,
|
||||
b.webhookToken,
|
||||
@ -185,7 +181,12 @@ func (b *bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat
|
||||
if b.UseChannelID {
|
||||
rmsg.Channel = "ID:" + m.ChannelID
|
||||
}
|
||||
rmsg.Username = b.getNick(m.Author)
|
||||
|
||||
if !b.Config.UseUserName {
|
||||
rmsg.Username = b.getNick(m.Author)
|
||||
} else {
|
||||
rmsg.Username = m.Author.Username
|
||||
}
|
||||
|
||||
if b.Config.ShowEmbeds && m.Message.Embeds != nil {
|
||||
for _, embed := range m.Message.Embeds {
|
||||
|
@ -1,3 +1,8 @@
|
||||
# v1.0.0
|
||||
## New features
|
||||
* general: Add action support for slack,mattermost,irc,gitter,matrix,xmpp,discord. #199
|
||||
* discord: Shows the username instead of the server nickname #234
|
||||
|
||||
# v1.0.0-rc1
|
||||
## New features
|
||||
* general: Add action support for slack,mattermost,irc,gitter,matrix,xmpp,discord. #199
|
||||
|
@ -5,14 +5,13 @@ import (
|
||||
"fmt"
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
"github.com/42wim/matterbridge/gateway"
|
||||
//"github.com/42wim/matterbridge/gateway/samechannel"
|
||||
log "github.com/Sirupsen/logrus"
|
||||
"github.com/google/gops/agent"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var (
|
||||
version = "1.0.0-rc1"
|
||||
version = "1.0.0"
|
||||
githash string
|
||||
)
|
||||
|
||||
|
@ -443,6 +443,10 @@ Server="yourservername"
|
||||
#OPTIONAL (default false)
|
||||
ShowEmbeds=false
|
||||
|
||||
#Shows the username (minus the discriminator) instead of the server nickname
|
||||
#OPTIONAL (default false)
|
||||
UseUserName=false
|
||||
|
||||
#Specify WebhookURL. If given, will relay messages using the Webhook, which gives a better look to messages.
|
||||
#OPTIONAL (default empty)
|
||||
WebhookURL="Yourwebhooktokenhere"
|
||||
|
Reference in New Issue
Block a user