mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-24 02:15:46 +03:00
Allow custom push gateway to use non-default port (#8376)
This commit is contained in:
parent
3c2c6ef136
commit
e37fe1f8f5
2 changed files with 3 additions and 1 deletions
1
changelog.d/8376.bugfix
Normal file
1
changelog.d/8376.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Allow custom push gateway to use non-default port
|
|
@ -104,7 +104,8 @@ class UnifiedPushHelper @Inject constructor(
|
|||
// else, unifiedpush, and pushkey is an endpoint
|
||||
val gateway = stringProvider.getString(R.string.default_push_gateway_http_url)
|
||||
val parsed = URL(endpoint)
|
||||
val custom = "${parsed.protocol}://${parsed.host}/_matrix/push/v1/notify"
|
||||
val port = if (parsed.port != -1) { ":${parsed.port}" } else { "" }
|
||||
val custom = "${parsed.protocol}://${parsed.host}${port}/_matrix/push/v1/notify"
|
||||
Timber.i("Testing $custom")
|
||||
try {
|
||||
val response = matrix.rawService().getUrl(custom, CacheStrategy.NoCache)
|
||||
|
|
Loading…
Reference in a new issue