4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-06-27 13:29:25 +00:00

Refactor and add MediaDownloadSize to General

This commit is contained in:
Wim
2017-12-19 23:15:03 +01:00
parent 4a4a29c9f6
commit 265457b451
14 changed files with 80 additions and 131 deletions

View File

@ -60,6 +60,7 @@ type Protocol struct {
IgnoreMessages string // all protocols
Jid string // xmpp
Login string // mattermost, matrix
MediaDownloadSize int // all protocols
MediaServerDownload string
MediaServerUpload string
MessageDelay int // IRC, time in millisecond to wait between messages
@ -147,6 +148,13 @@ type Config struct {
SameChannelGateway []SameChannelGateway
}
type BridgeConfig struct {
Config Protocol
General *Protocol
Account string
Remote chan Message
}
func NewConfig(cfgfile string) *Config {
var cfg Config
if _, err := toml.DecodeFile(cfgfile, &cfg); err != nil {