fix: remover URLs sms-gate.app residuais de GatewaySettings
Build AAB — WhatSMS Gateway / build (push) Failing after 36s
Build AAB — WhatSMS Gateway / build (push) Failing after 36s
This commit is contained in:
@@ -54,9 +54,7 @@ class GatewaySettings(
|
|||||||
private const val PRIVATE_TOKEN = "private_token"
|
private const val PRIVATE_TOKEN = "private_token"
|
||||||
private const val NOTIFICATION_CHANNEL = "notification_channel"
|
private const val NOTIFICATION_CHANNEL = "notification_channel"
|
||||||
|
|
||||||
const val PUBLIC_URL = "https://api.sms-gate.app/mobile/v1"
|
// WhatSMS fork: servidor da Descomplicar.
|
||||||
|
|
||||||
// WhatSMS fork: server capcom6 privado da Descomplicar.
|
|
||||||
const val WHATSMS_SERVER_URL = "https://smsgw.whatsms.pt/api/mobile/v1"
|
const val WHATSMS_SERVER_URL = "https://smsgw.whatsms.pt/api/mobile/v1"
|
||||||
|
|
||||||
// WhatSMS fork: private_token do GATEWAY_TOKEN config do server.
|
// WhatSMS fork: private_token do GATEWAY_TOKEN config do server.
|
||||||
@@ -76,7 +74,7 @@ class GatewaySettings(
|
|||||||
return data.map {
|
return data.map {
|
||||||
when (it.key) {
|
when (it.key) {
|
||||||
CLOUD_URL -> {
|
CLOUD_URL -> {
|
||||||
val url = it.value?.toString() ?: PUBLIC_URL
|
val url = it.value?.toString() ?: WHATSMS_SERVER_URL
|
||||||
if (url != null && !url.startsWith("https://")) {
|
if (url != null && !url.startsWith("https://")) {
|
||||||
throw IllegalArgumentException("url must start with https://")
|
throw IllegalArgumentException("url must start with https://")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user