-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: leave call from system message 'call_ended_everyone' #13977
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a quick test, this only seems to work/make a difference with HPB and not for the moderator.
- User left side
- Moderator right side
Bildschirmaufzeichnung.vom.2024-12-11.07-34-08.webm
but I tested with 2 sleeps in the leave call controller method
Make join slow
diff --git a/lib/Controller/CallController.php b/lib/Controller/CallController.php
index 8128e4314..c292b655c 100644
--- a/lib/Controller/CallController.php
+++ b/lib/Controller/CallController.php
@@ -221,6 +221,8 @@ class CallController extends AEnvironmentAwareOCSController {
#[RequireParticipant]
#[RequireReadWriteConversation]
public function joinCall(?int $flags = null, bool $silent = false, bool $recordingConsent = false): DataResponse {
+ // SIMULATE OVERLOADED SERVER
+ sleep(5);
try {
$this->validateRecordingConsent($recordingConsent);
} catch (\InvalidArgumentException) {
@@ -248,6 +250,8 @@ class CallController extends AEnvironmentAwareOCSController {
$this->participantService->changeInCall($this->room, $this->participant, $flags, false, $silent);
}
+ // SIMULATE HUGE CALL
+ sleep(15);
return $response;
}
@@ -257,6 +261,9 @@ class CallController extends AEnvironmentAwareOCSController {
} catch (\InvalidArgumentException $e) {
return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST);
}
+
+ // SIMULATE HUGE CALL
+ sleep(15);
return new DataResponse(null);
}
Make leave slow
diff --git a/lib/Controller/CallController.php b/lib/Controller/CallController.php
index 8128e4314..0be725cd4 100644
--- a/lib/Controller/CallController.php
+++ b/lib/Controller/CallController.php
@@ -493,6 +493,9 @@ class CallController extends AEnvironmentAwareOCSController {
#[PublicPage]
#[RequireParticipant]
public function leaveCall(bool $all = false): DataResponse {
+ // SIMULATE OVERLOADED SERVER
+ sleep(5);
+
$session = $this->participant->getSession();
if (!$session instanceof Session) {
return new DataResponse(null, Http::STATUS_NOT_FOUND);
@@ -507,6 +510,9 @@ class CallController extends AEnvironmentAwareOCSController {
$this->participantService->changeInCall($this->room, $this->participant, Participant::FLAG_DISCONNECTED);
}
+ // SIMULATE HUGE CALL
+ sleep(15);
+
return $response;
}
@@ -526,6 +532,9 @@ class CallController extends AEnvironmentAwareOCSController {
}
}
+ // SIMULATE HUGE CALL
+ sleep(15);
+
return new DataResponse(null);
}
context.dispatch('leaveCall', { | ||
token, | ||
participantIdentifier: context.getters.getParticipantIdentifier(), | ||
}) | ||
const callViewStore = useCallViewStore() | ||
callViewStore.setCallHasJustEnded(message.timestamp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should do this first, to disable the button already
☑️ Resolves
usersInCallChanged
) to leave by itselfHow to test:
🖌️ UI Checklist
🖼️ Screenshots / Screencasts
🏁 Checklist