Browse Source

config: add message_send_checkpoint_endpoint

Sumner Evans 3 years ago
parent
commit
d5387bba41
3 changed files with 8 additions and 4 deletions
  1. 5 4
      config/config.go
  2. 1 0
      config/upgrade.go
  3. 2 0
      example-config.yaml

+ 5 - 4
config/config.go

@@ -29,10 +29,11 @@ var ExampleConfig string
 
 type Config struct {
 	Homeserver struct {
-		Address        string `yaml:"address"`
-		Domain         string `yaml:"domain"`
-		Asmux          bool   `yaml:"asmux"`
-		StatusEndpoint string `yaml:"status_endpoint"`
+		Address                       string `yaml:"address"`
+		Domain                        string `yaml:"domain"`
+		Asmux                         bool   `yaml:"asmux"`
+		StatusEndpoint                string `yaml:"status_endpoint"`
+		MessageSendCheckpointEndpoint string `yaml:"message_send_checkpoint_endpoint"`
 	} `yaml:"homeserver"`
 
 	AppService struct {

+ 1 - 0
config/upgrade.go

@@ -31,6 +31,7 @@ func (helper *UpgradeHelper) doUpgrade() {
 	helper.Copy(Str, "homeserver", "domain")
 	helper.Copy(Bool, "homeserver", "asmux")
 	helper.Copy(Str|Null, "homeserver", "status_endpoint")
+	helper.Copy(Str|Null, "homeserver", "message_send_checkpoint_endpoint")
 
 	helper.Copy(Str, "appservice", "address")
 	helper.Copy(Str, "appservice", "hostname")

+ 2 - 0
example-config.yaml

@@ -11,6 +11,8 @@ homeserver:
     # If set, the bridge will make POST requests to this URL whenever a user's whatsapp connection state changes.
     # The bridge will use the appservice as_token to authorize requests.
     status_endpoint: null
+    # Endpoint for reporting per-message status.
+    message_send_checkpoint_endpoint: null
 
 # Application service host/registration related details.
 # Changing these values requires regeneration of the registration.