Add quality survey at the end of the call (#1084)

Signed-off-by: Timo K <toger5@hotmail.de>
Co-authored-by: Robin <robin@robin.town>
This commit is contained in:
Timo 2023-06-07 16:22:44 +02:00 committed by GitHub
commit 2a6981c58d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 338 additions and 30 deletions

View file

@ -203,7 +203,11 @@ export function GroupCallView({
widget.api.transport.send(ElementWidgetActions.HangupCall, {});
}
if (!isPasswordlessUser && !isEmbedded) {
if (
!isPasswordlessUser &&
!isEmbedded &&
!PosthogAnalytics.instance.isEnabled()
) {
history.push("/");
}
}, [groupCall, leave, isPasswordlessUser, isEmbedded, history]);
@ -268,8 +272,14 @@ export function GroupCallView({
);
}
} else if (left) {
if (isPasswordlessUser) {
return <CallEndedView client={client} />;
if (isPasswordlessUser || PosthogAnalytics.instance.isEnabled()) {
return (
<CallEndedView
endedCallId={groupCall.groupCallId}
client={client}
isPasswordlessUser={isPasswordlessUser}
/>
);
} else {
// If the user is a regular user, we'll have sent them back to the homepage,
// so just sit here & do nothing: otherwise we would (briefly) mount the