mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Send call link update sync message upon call link creation.
This commit is contained in:
@@ -10,11 +10,13 @@ import io.reactivex.rxjava3.schedulers.Schedulers
|
||||
import org.thoughtcrime.securesms.database.CallLinkTable
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies
|
||||
import org.thoughtcrime.securesms.jobs.CallLinkUpdateSendJob
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.thoughtcrime.securesms.service.webrtc.links.CallLinkCredentials
|
||||
import org.thoughtcrime.securesms.service.webrtc.links.CreateCallLinkResult
|
||||
import org.thoughtcrime.securesms.service.webrtc.links.SignalCallLinkManager
|
||||
import org.whispersystems.signalservice.internal.push.SyncMessage
|
||||
|
||||
/**
|
||||
* Repository for creating new call links. This will delegate to the [SignalCallLinkManager]
|
||||
@@ -44,6 +46,13 @@ class CreateCallLinkRepository(
|
||||
)
|
||||
)
|
||||
|
||||
ApplicationDependencies.getJobManager().add(
|
||||
CallLinkUpdateSendJob(
|
||||
credentials.roomId,
|
||||
SyncMessage.CallLinkUpdate.Type.UPDATE
|
||||
)
|
||||
)
|
||||
|
||||
EnsureCallLinkCreatedResult.Success(
|
||||
Recipient.resolved(
|
||||
SignalDatabase.recipients.getByCallLinkRoomId(credentials.roomId).get()
|
||||
|
||||
@@ -78,6 +78,7 @@ class CallLinkUpdateSendJob private constructor(
|
||||
|
||||
val callLinkUpdate = CallLinkUpdate(
|
||||
rootKey = callLink.credentials.linkKeyBytes.toByteString(),
|
||||
adminPassKey = callLink.credentials.adminPassBytes?.toByteString(),
|
||||
type = callLinkUpdateType
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user