Эх сурвалжийг харах

Update mautrix-go to enable appservice websockets

Tulir Asokan 2 жил өмнө
parent
commit
b2d7077e8d
4 өөрчлөгдсөн 11 нэмэгдсэн , 3 устгасан
  1. 7 0
      example-config.yaml
  2. 1 1
      go.mod
  3. 2 2
      go.sum
  4. 1 0
      main.go

+ 7 - 0
example-config.yaml

@@ -20,6 +20,13 @@ homeserver:
     # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
     # Does the homeserver support https://github.com/matrix-org/matrix-spec-proposals/pull/2246?
     async_media: false
     async_media: false
 
 
+    # Should the bridge use a websocket for connecting to the homeserver?
+    # The server side is currently not documented anywhere and is only implemented by mautrix-wsproxy,
+    # mautrix-asmux (deprecated), and hungryserv (proprietary).
+    websocket: false
+    # How often should the websocket be pinged? Pinging will be disabled if this is zero.
+    ping_interval_seconds: 0
+
 # Application service host/registration related details.
 # Application service host/registration related details.
 # Changing these values requires regeneration of the registration.
 # Changing these values requires regeneration of the registration.
 appservice:
 appservice:

+ 1 - 1
go.mod

@@ -16,7 +16,7 @@ require (
 	github.com/yuin/goldmark v1.5.4
 	github.com/yuin/goldmark v1.5.4
 	golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
 	golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea
 	maunium.net/go/maulogger/v2 v2.4.1
 	maunium.net/go/maulogger/v2 v2.4.1
-	maunium.net/go/mautrix v0.15.3-0.20230609085119-3b3db3ca863b
+	maunium.net/go/mautrix v0.15.3-0.20230609132253-737448a3d1b3
 )
 )
 
 
 require (
 require (

+ 2 - 2
go.sum

@@ -72,5 +72,5 @@ maunium.net/go/mauflag v1.0.0 h1:YiaRc0tEI3toYtJMRIfjP+jklH45uDHtT80nUamyD4M=
 maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA=
 maunium.net/go/mauflag v1.0.0/go.mod h1:nLivPOpTpHnpzEh8jEdSL9UqO9+/KBJFmNRlwKfkPeA=
 maunium.net/go/maulogger/v2 v2.4.1 h1:N7zSdd0mZkB2m2JtFUsiGTQQAdP0YeFWT7YMc80yAL8=
 maunium.net/go/maulogger/v2 v2.4.1 h1:N7zSdd0mZkB2m2JtFUsiGTQQAdP0YeFWT7YMc80yAL8=
 maunium.net/go/maulogger/v2 v2.4.1/go.mod h1:omPuYwYBILeVQobz8uO3XC8DIRuEb5rXYlQSuqrbCho=
 maunium.net/go/maulogger/v2 v2.4.1/go.mod h1:omPuYwYBILeVQobz8uO3XC8DIRuEb5rXYlQSuqrbCho=
-maunium.net/go/mautrix v0.15.3-0.20230609085119-3b3db3ca863b h1:D2J4FSnHvdSbDb1ejTZEJySfH4sFpdZdKBFfuv73Jco=
-maunium.net/go/mautrix v0.15.3-0.20230609085119-3b3db3ca863b/go.mod h1:h4NwfKqE4YxGTLSgn/gawKzXAb2sF4qx8agL6QEFtGg=
+maunium.net/go/mautrix v0.15.3-0.20230609132253-737448a3d1b3 h1:bdQzpBVuspDtTO+Vm+n9m14B2Fy8lK+YpKoP8Dk/xa0=
+maunium.net/go/mautrix v0.15.3-0.20230609132253-737448a3d1b3/go.mod h1:h4NwfKqE4YxGTLSgn/gawKzXAb2sF4qx8agL6QEFtGg=

+ 1 - 0
main.go

@@ -103,6 +103,7 @@ func (br *DiscordBridge) Start() {
 		br.provisioning = newProvisioningAPI(br)
 		br.provisioning = newProvisioningAPI(br)
 	}
 	}
 	go br.updatePuppetsContactInfo()
 	go br.updatePuppetsContactInfo()
+	br.WaitWebsocketConnected()
 	go br.startUsers()
 	go br.startUsers()
 }
 }