Peek group calls when opening conversations and leaving calls

This commit is contained in:
Evan Hahn 2022-02-08 13:18:51 -06:00 committed by GitHub
parent 5ce26eb91a
commit f5a4cd9ce8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 202 additions and 373 deletions

View file

@ -1138,7 +1138,6 @@ export function getPropsForCallHistory(
throw new Error('getPropsForCallHistory: missing conversation ID');
}
const creator = conversationSelector(callHistoryDetails.creatorUuid);
let call = callSelector(conversationId);
if (call && call.callMode !== CallMode.Group) {
log.error(
@ -1147,14 +1146,18 @@ export function getPropsForCallHistory(
call = undefined;
}
const creator = conversationSelector(callHistoryDetails.creatorUuid);
const deviceCount = call?.peekInfo?.deviceCount ?? 0;
return {
activeCallConversationId: activeCall?.conversationId,
callMode: CallMode.Group,
conversationId,
creator,
deviceCount: call?.peekInfo.deviceCount ?? 0,
ended: callHistoryDetails.eraId !== call?.peekInfo.eraId,
maxDevices: call?.peekInfo.maxDevices ?? Infinity,
deviceCount,
ended:
callHistoryDetails.eraId !== call?.peekInfo?.eraId || !deviceCount,
maxDevices: call?.peekInfo?.maxDevices ?? Infinity,
startedTime: callHistoryDetails.startedTime,
};
}