diff --git a/VERSION.properties b/VERSION.properties index fe30222..7c10852 100644 --- a/VERSION.properties +++ b/VERSION.properties @@ -1,2 +1,2 @@ -client.version=1.2.38 -server.version=1.2.32 +client.version=1.2.39 +server.version=1.2.33 diff --git a/shine-UI/js/services/call-service.js b/shine-UI/js/services/call-service.js index 151c8ad..83636f8 100644 --- a/shine-UI/js/services/call-service.js +++ b/shine-UI/js/services/call-service.js @@ -853,8 +853,23 @@ async function finalizeCall(call, { call.phase = 'ended'; call.statusText = 'Звонок завершён'; + if (String(localReasonCode || '') === 'busy') { + call.statusText = 'Пользователь занят'; + } notifyCallState(); + const finalHoldMs = String(localReasonCode || '') === 'busy' ? 2600 : 0; + if (finalHoldMs > 0) { + window.setTimeout(() => { + calls.delete(call.callId); + if (activeCallId === call.callId) { + activeCallId = ''; + } + notifyCallState(); + }, finalHoldMs); + return; + } + calls.delete(call.callId); if (activeCallId === call.callId) { activeCallId = ''; diff --git a/src/test/java/test/it/IT_DeployRestartNoCleanNoTestsMain.java b/src/test/java/test/it/IT_DeployRestartNoCleanNoTestsMain.java index ca0adc9..df0139c 100644 --- a/src/test/java/test/it/IT_DeployRestartNoCleanNoTestsMain.java +++ b/src/test/java/test/it/IT_DeployRestartNoCleanNoTestsMain.java @@ -9,16 +9,18 @@ import java.util.jar.JarFile; public class IT_DeployRestartNoCleanNoTestsMain { // ====== НАСТРОЙКИ (можно переопределять systemProperty) ====== - private static final String REMOTE_HOST = System.getProperty("it.remoteHost", "194.87.0.247"); - private static final String REMOTE_USER = System.getProperty("it.remoteUser", "user"); + private static final String REMOTE_HOST = System.getProperty("it.remoteHost", "shineup.me"); + private static final String REMOTE_USER = System.getProperty("it.remoteUser", "player"); - private static final String REMOTE_DIR = System.getProperty("it.remoteDir", "/home/user/docker/shine-server"); + private static final String REMOTE_DIR = System.getProperty("it.remoteDir", "/home/player/SHiNE/shine-server"); private static final String REMOTE_JAR = REMOTE_DIR + "/shine-server.jar"; private static final String SERVICE_NAME = System.getProperty("it.service", "shine-server"); private static final String LOCAL_JAR = System.getProperty("it.localJar", "build/libs/shine-server.jar"); public static void main(String[] args) { + ensureSudoNoPasswordOrThrow(); + // 1) stop service на сервере sshStrict("sudo systemctl stop " + SERVICE_NAME + " || true"); @@ -40,6 +42,15 @@ public class IT_DeployRestartNoCleanNoTestsMain { System.out.println("deploy_no_clean_no_tests_done"); } + private static void ensureSudoNoPasswordOrThrow() { + int code = ssh("sudo -n true"); + if (code == 0) return; + throw new RuntimeException( + "Remote sudo requires password for " + REMOTE_USER + "@" + REMOTE_HOST + + ". Configure NOPASSWD for service control or run deploy with privileged user." + ); + } + private static void waitRemotePort7070() { for (int i = 0; i < 50; i++) { int code = ssh("ss -ltnp | grep -q ':7070'");