Add support for authenticated media
This commit is contained in:
@@ -37,6 +37,9 @@ type BridgeConfig struct {
|
||||
|
||||
PortalMessageBuffer int `yaml:"portal_message_buffer"`
|
||||
|
||||
PublicAddress string `yaml:"public_address"`
|
||||
AvatarProxyKey string `yaml:"avatar_proxy_key"`
|
||||
|
||||
DeliveryReceipts bool `yaml:"delivery_receipts"`
|
||||
MessageStatusEvents bool `yaml:"message_status_events"`
|
||||
MessageErrorNotices bool `yaml:"message_error_notices"`
|
||||
|
||||
@@ -26,8 +26,6 @@ import (
|
||||
func DoUpgrade(helper *up.Helper) {
|
||||
bridgeconfig.Upgrader.DoUpgrade(helper)
|
||||
|
||||
helper.Copy(up.Str|up.Null, "homeserver", "public_address")
|
||||
|
||||
helper.Copy(up.Str, "bridge", "username_template")
|
||||
helper.Copy(up.Str, "bridge", "displayname_template")
|
||||
helper.Copy(up.Str, "bridge", "channel_name_template")
|
||||
@@ -42,6 +40,12 @@ func DoUpgrade(helper *up.Helper) {
|
||||
helper.Copy(up.Str, "bridge", "private_chat_portal_meta")
|
||||
}
|
||||
helper.Copy(up.Int, "bridge", "startup_private_channel_create_limit")
|
||||
helper.Copy(up.Str|up.Null, "bridge", "public_address")
|
||||
if apkey, ok := helper.Get(up.Str, "bridge", "avatar_proxy_key"); !ok || apkey == "generate" {
|
||||
helper.Set(up.Str, random.String(32), "bridge", "avatar_proxy_key")
|
||||
} else {
|
||||
helper.Copy(up.Str, "bridge", "avatar_proxy_key")
|
||||
}
|
||||
helper.Copy(up.Int, "bridge", "portal_message_buffer")
|
||||
helper.Copy(up.Bool, "bridge", "delivery_receipts")
|
||||
helper.Copy(up.Bool, "bridge", "message_status_events")
|
||||
|
||||
Reference in New Issue
Block a user