CallLink profile sharing via ProfileKeySendJob.

This commit is contained in:
Alex Hart
2023-10-03 09:27:42 -04:00
committed by Cody Henthorne
parent e9a616c68d
commit f5c5a34798
5 changed files with 59 additions and 29 deletions

View File

@@ -9,7 +9,7 @@ import org.signal.core.util.logging.Log
import org.signal.ringrtc.CallException
import org.signal.ringrtc.GroupCall
import org.signal.ringrtc.PeekInfo
import org.thoughtcrime.securesms.components.webrtc.CallLinkNullMessageSender
import org.thoughtcrime.securesms.components.webrtc.CallLinkProfileKeySender
import org.thoughtcrime.securesms.database.CallLinkTable
import org.thoughtcrime.securesms.database.SignalDatabase
import org.thoughtcrime.securesms.events.CallParticipant
@@ -46,6 +46,9 @@ class CallLinkConnectedActionProcessor(
val callLinkRoomId: CallLinkRoomId = superState.callInfoState.callRecipient.requireCallLinkRoomId()
val callLink: CallLinkTable.CallLink = SignalDatabase.callLinks.getCallLinkByRoomId(callLinkRoomId) ?: return superState
val joinedParticipants: Set<Recipient> = peekInfo.joinedMembers.map { Recipient.externalPush(ServiceId.ACI.from(it)) }.toSet()
CallLinkProfileKeySender.onRecipientsUpdated(joinedParticipants)
if (callLink.credentials?.adminPassBytes == null) {
Log.i(tag, "User is not an admin.")
@@ -55,8 +58,6 @@ class CallLinkConnectedActionProcessor(
Log.i(tag, "Updating pending list with ${peekInfo.pendingUsers.size} entries.")
val pendingParticipants: List<Recipient> = peekInfo.pendingUsers.map { Recipient.externalPush(ServiceId.ACI.from(it)) }
CallLinkNullMessageSender.onRecipientsUpdated(superState.callInfoState.remoteCallParticipants.map { it.recipient }.toSet())
return superState.builder()
.changeCallInfoState()
.setCallLinkPendingParticipants(pendingParticipants)