Allow anyone to join a call link.

This commit is contained in:
Alex Hart
2024-09-10 13:10:21 -03:00
committed by Cody Henthorne
parent c3be92d365
commit 9912a5fdfe
7 changed files with 10 additions and 50 deletions

View File

@@ -12,7 +12,6 @@ import org.thoughtcrime.securesms.jobmanager.JsonJobData
import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint
import org.thoughtcrime.securesms.recipients.Recipient
import org.thoughtcrime.securesms.recipients.RecipientId
import org.thoughtcrime.securesms.util.RemoteConfig
import java.util.concurrent.TimeUnit
/**
@@ -46,11 +45,6 @@ internal class CallLinkPeekJob private constructor(
)
override fun onRun() {
if (!RemoteConfig.adHocCalling) {
Log.i(TAG, "Ad hoc calling is disabled. Dropping peek for call link.")
return
}
val recipient = Recipient.resolved(callLinkRecipientId)
if (!recipient.isCallLink) {
Log.w(TAG, "Recipient was not a call link. Ignoring.")

View File

@@ -13,7 +13,6 @@ import org.thoughtcrime.securesms.jobmanager.Job
import org.thoughtcrime.securesms.jobmanager.impl.NetworkConstraint
import org.thoughtcrime.securesms.jobs.protos.CallLinkUpdateSendJobData
import org.thoughtcrime.securesms.service.webrtc.links.CallLinkRoomId
import org.thoughtcrime.securesms.util.RemoteConfig
import org.whispersystems.signalservice.api.messages.multidevice.SignalServiceSyncMessage
import org.whispersystems.signalservice.api.push.exceptions.PushNetworkException
import org.whispersystems.signalservice.api.push.exceptions.ServerRejectedException
@@ -63,11 +62,6 @@ class CallLinkUpdateSendJob private constructor(
override fun onFailure() = Unit
override fun onRun() {
if (!RemoteConfig.adHocCalling) {
Log.i(TAG, "Call links are not enabled. Exiting.")
return
}
val callLink = SignalDatabase.callLinks.getCallLinkByRoomId(callLinkRoomId)
if (callLink?.credentials == null) {
Log.i(TAG, "Call link not found or missing credentials. Exiting.")