mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 02:10:44 +01:00
Add CallLink Observed event and handling.
This commit is contained in:
@@ -47,6 +47,18 @@ object CallEventSyncMessageUtil {
|
||||
)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun createObservedCallEvent(remotePeer: RemotePeer, timestamp: Long, isOutgoing: Boolean, isVideoCall: Boolean): CallEvent {
|
||||
return createCallEvent(
|
||||
remotePeer.id,
|
||||
remotePeer.callId.longValue(),
|
||||
timestamp,
|
||||
isOutgoing,
|
||||
isVideoCall,
|
||||
CallEvent.Event.OBSERVED
|
||||
)
|
||||
}
|
||||
|
||||
private fun createCallEvent(
|
||||
recipientId: RecipientId,
|
||||
callId: Long,
|
||||
|
||||
@@ -424,6 +424,14 @@ public final class SignalCallManager implements CallManager.Observer, GroupCall.
|
||||
return;
|
||||
}
|
||||
|
||||
String eraId = info.getEraId();
|
||||
if (eraId != null && !info.getJoinedMembers().isEmpty()) {
|
||||
if (SignalDatabase.calls().insertAdHocCallFromObserveEvent(callLinkRecipient, System.currentTimeMillis(), eraId)) {
|
||||
AppDependencies.getJobManager()
|
||||
.add(CallSyncEventJob.createForObserved(callLinkRecipient.getId(), CallId.fromEra(eraId).longValue()));
|
||||
}
|
||||
}
|
||||
|
||||
linkPeekInfoStore.update(store -> {
|
||||
Map<RecipientId, CallLinkPeekInfo> newHashMap = new HashMap<>(store);
|
||||
newHashMap.put(id, CallLinkPeekInfo.fromPeekInfo(info));
|
||||
|
||||
Reference in New Issue
Block a user