Ignore call links check if ff is disabled.
This commit is contained in:
parent
192154a11c
commit
72edf5c08b
1 changed files with 9 additions and 0 deletions
|
@ -14,6 +14,7 @@ import org.thoughtcrime.securesms.database.DatabaseObserver
|
|||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
|
||||
import org.thoughtcrime.securesms.service.webrtc.links.CallLinkRoomId
|
||||
import org.thoughtcrime.securesms.util.FeatureFlags
|
||||
import java.net.URLDecoder
|
||||
|
||||
/**
|
||||
|
@ -53,6 +54,10 @@ object CallLinks {
|
|||
|
||||
@JvmStatic
|
||||
fun isCallLink(url: String): Boolean {
|
||||
if (FeatureFlags.adHocCalling()) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (!url.startsWith(HTTPS_LINK_PREFIX) && !url.startsWith(SNGL_LINK_PREFIX)) {
|
||||
Log.w(TAG, "Invalid url prefix.")
|
||||
return false
|
||||
|
@ -63,6 +68,10 @@ object CallLinks {
|
|||
|
||||
@JvmStatic
|
||||
fun parseUrl(url: String): CallLinkRootKey? {
|
||||
if (FeatureFlags.adHocCalling()) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (!url.startsWith(HTTPS_LINK_PREFIX) && !url.startsWith(SNGL_LINK_PREFIX)) {
|
||||
Log.w(TAG, "Invalid url prefix.")
|
||||
return null
|
||||
|
|
Loading…
Add table
Reference in a new issue