forked from lug/matterbridge
		
	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 | # Installing | ||||||
| ## Binaries | ## 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/)   | * Development releases (follows master) can be downloaded [here](https://dl.bintray.com/42wim/nightly/)   | ||||||
|  |  | ||||||
| ## Building | ## Building | ||||||
|   | |||||||
| @@ -77,6 +77,7 @@ type Protocol struct { | |||||||
| 	UseSASL                bool   // IRC | 	UseSASL                bool   // IRC | ||||||
| 	UseTLS                 bool   // IRC | 	UseTLS                 bool   // IRC | ||||||
| 	UseFirstName           bool   // telegram | 	UseFirstName           bool   // telegram | ||||||
|  | 	UseUserName            bool   // discord | ||||||
| 	UseInsecureURL         bool   // telegram | 	UseInsecureURL         bool   // telegram | ||||||
| 	WebhookBindAddress     string // mattermost, slack | 	WebhookBindAddress     string // mattermost, slack | ||||||
| 	WebhookURL             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) | 		flog.Errorf("Could not find channelID for %v", msg.Channel) | ||||||
| 		return nil | 		return nil | ||||||
| 	} | 	} | ||||||
|  | 	if msg.Event == config.EVENT_USER_ACTION { | ||||||
|  | 		msg.Text = "_" + msg.Text + "_" | ||||||
|  | 	} | ||||||
| 	if b.Config.WebhookURL == "" { | 	if b.Config.WebhookURL == "" { | ||||||
| 		flog.Debugf("Broadcasting using token (API)") | 		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) | 		b.c.ChannelMessageSend(channelID, msg.Username+msg.Text) | ||||||
| 	} else { | 	} else { | ||||||
| 		flog.Debugf("Broadcasting using Webhook") | 		flog.Debugf("Broadcasting using Webhook") | ||||||
| 		if msg.Event == config.EVENT_USER_ACTION { |  | ||||||
| 			msg.Text = "_" + msg.Text + "_" |  | ||||||
| 		} |  | ||||||
| 		b.c.WebhookExecute( | 		b.c.WebhookExecute( | ||||||
| 			b.webhookID, | 			b.webhookID, | ||||||
| 			b.webhookToken, | 			b.webhookToken, | ||||||
| @@ -185,7 +181,12 @@ func (b *bdiscord) messageCreate(s *discordgo.Session, m *discordgo.MessageCreat | |||||||
| 	if b.UseChannelID { | 	if b.UseChannelID { | ||||||
| 		rmsg.Channel = "ID:" + m.ChannelID | 		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 { | 	if b.Config.ShowEmbeds && m.Message.Embeds != nil { | ||||||
| 		for _, embed := range m.Message.Embeds { | 		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 | # v1.0.0-rc1 | ||||||
| ## New features | ## New features | ||||||
| * general: Add action support for slack,mattermost,irc,gitter,matrix,xmpp,discord. #199 | * general: Add action support for slack,mattermost,irc,gitter,matrix,xmpp,discord. #199 | ||||||
|   | |||||||
| @@ -5,14 +5,13 @@ import ( | |||||||
| 	"fmt" | 	"fmt" | ||||||
| 	"github.com/42wim/matterbridge/bridge/config" | 	"github.com/42wim/matterbridge/bridge/config" | ||||||
| 	"github.com/42wim/matterbridge/gateway" | 	"github.com/42wim/matterbridge/gateway" | ||||||
| 	//"github.com/42wim/matterbridge/gateway/samechannel" |  | ||||||
| 	log "github.com/Sirupsen/logrus" | 	log "github.com/Sirupsen/logrus" | ||||||
| 	"github.com/google/gops/agent" | 	"github.com/google/gops/agent" | ||||||
| 	"strings" | 	"strings" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| var ( | var ( | ||||||
| 	version = "1.0.0-rc1" | 	version = "1.0.0" | ||||||
| 	githash string | 	githash string | ||||||
| ) | ) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -443,6 +443,10 @@ Server="yourservername" | |||||||
| #OPTIONAL (default false) | #OPTIONAL (default false) | ||||||
| ShowEmbeds=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. | #Specify WebhookURL. If given, will relay messages using the Webhook, which gives a better look to messages. | ||||||
| #OPTIONAL (default empty) | #OPTIONAL (default empty) | ||||||
| WebhookURL="Yourwebhooktokenhere" | WebhookURL="Yourwebhooktokenhere" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user