Change bridge info protocol ID and add resend_bridge_info config option

This commit is contained in:
Tulir Asokan
2022-06-27 11:48:51 +03:00
parent 51d377c60d
commit d0f5e5d7de
6 changed files with 22 additions and 4 deletions

View File

@@ -45,6 +45,7 @@ type BridgeConfig struct {
SyncWithCustomPuppets bool `yaml:"sync_with_custom_puppets"`
SyncDirectChatList bool `yaml:"sync_direct_chat_list"`
ResendBridgeInfo bool `yaml:"resend_bridge_info"`
FederateRooms bool `yaml:"federate_rooms"`
DoublePuppetServerMap map[string]string `yaml:"double_puppet_server_map"`
@@ -65,6 +66,10 @@ type BridgeConfig struct {
channelnameTemplate *template.Template `yaml:"-"`
}
func (bc *BridgeConfig) GetResendBridgeInfo() bool {
return bc.ResendBridgeInfo
}
func (bc *BridgeConfig) EnableMessageStatusEvents() bool {
return bc.MessageStatusEvents
}

View File

@@ -35,6 +35,7 @@ func DoUpgrade(helper *up.Helper) {
helper.Copy(up.Bool, "bridge", "restricted_rooms")
helper.Copy(up.Bool, "bridge", "sync_with_custom_puppets")
helper.Copy(up.Bool, "bridge", "sync_direct_chat_list")
helper.Copy(up.Bool, "bridge", "resend_bridge_info")
helper.Copy(up.Bool, "bridge", "federate_rooms")
helper.Copy(up.Map, "bridge", "double_puppet_server_map")
helper.Copy(up.Bool, "bridge", "double_puppet_allow_discovery")