4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 08:49:24 +00:00

Add support for NoSendJoinPart. Closes #382

This commit is contained in:
Wim
2018-03-06 21:34:55 +01:00
parent 9e5da2f9d7
commit e5989adf92
5 changed files with 26 additions and 0 deletions

View File

@ -400,6 +400,9 @@ func (b *Bmattermost) skipMessage(message *matterclient.Message) bool {
if message.Type == "system_join_leave" ||
message.Type == "system_join_channel" ||
message.Type == "system_leave_channel" {
if b.GetBool("nosendjoinpart") {
return true
}
b.Log.Debugf("Sending JOIN_LEAVE event from %s to gateway", b.Account)
b.Remote <- config.Message{Username: "system", Text: message.Text, Channel: message.Channel, Account: b.Account, Event: config.EVENT_JOIN_LEAVE}
return true