Prechádzať zdrojové kódy

Remove more unused config fields

Tulir Asokan 3 rokov pred
rodič
commit
73f0f0bbd7
2 zmenil súbory, kde vykonal 5 pridanie a 17 odobranie
  1. 0 6
      config/bridge.go
  2. 5 11
      example-config.yaml

+ 0 - 6
config/bridge.go

@@ -32,9 +32,6 @@ type BridgeConfig struct {
 	DisplaynameTemplate string `yaml:"displayname_template"`
 
 	DeliveryReceipts      bool `yaml:"delivery_receipts"`
-	MaxConnectionAttempts int  `yaml:"max_connection_attempts"`
-	ConnectionRetryDelay  int  `yaml:"connection_retry_delay"`
-	ReportConnectionRetry bool `yaml:"report_connection_retry"`
 	PortalMessageBuffer   int  `yaml:"portal_message_buffer"`
 
 	CallNotices struct {
@@ -99,9 +96,6 @@ type BridgeConfig struct {
 }
 
 func (bc *BridgeConfig) setDefaults() {
-	bc.MaxConnectionAttempts = 3
-	bc.ConnectionRetryDelay = -1
-	bc.ReportConnectionRetry = true
 	bc.PortalMessageBuffer = 128
 
 	bc.CallNotices.Start = true

+ 5 - 11
example-config.yaml

@@ -64,9 +64,10 @@ metrics:
 whatsapp:
     # Device name that's shown in the "WhatsApp Web" section in the mobile app.
     os_name: Mautrix-WhatsApp bridge
-    # Browser name that determines the logo shown in the mobile app. If the name is unrecognized, a generic icon is shown.
-    # Use the name of an actual browser (Chrome, Firefox, Safari, IE, Edge, Opera) if you want a specific icon.
-    browser_name: mx-wa
+    # Browser name that determines the logo shown in the mobile app.
+    # Must be "unknown" for a generic icon or a valid browser name if you want a specific icon.
+    # List of valid browser names: https://github.com/tulir/whatsmeow/blob/2a72655ef600a7fd7a2e98d53ec6da029759c4b8/binary/proto/def.proto#L1582-L1594
+    browser_name: unknown
 
 # Bridge config
 bridge:
@@ -86,14 +87,7 @@ bridge:
     # sent to WhatsApp. If fetch_message_on_timeout is enabled, a successful post-timeout fetch will
     # trigger a read receipt too.
     delivery_receipts: false
-    # Maximum number of times to retry connecting on connection error.
-    max_connection_attempts: 3
-    # Number of seconds to wait between connection attempts.
-    # Negative numbers are exponential backoff: -connection_retry_delay + 1 + 2^attempts
-    connection_retry_delay: -1
-    # Whether or not the bridge should send a notice to the user's management room when it retries connecting.
-    # If false, it will only report when it stops retrying.
-    report_connection_retry: true
+
     portal_message_buffer: 128
 
     # Whether or not to send call start/end notices to Matrix.