Skip to content

Commit 64043fa

Browse files
committed
fix: hangup handling outside the function
1 parent 45eeb20 commit 64043fa

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ npm i yemot-router2
4343

4444
**5.1.0**
4545
כל הפרמטרים שמתחילים במילה Api (פרמטרים אוטומטיים של ימות), לדוגמה `ApiExtension`, `ApiPhone`, כן מוזרקים אוטומטית לאובייקט הCall.
46+
47+
**5.1.1**
48+
תוקן באג שבו ניתוק מחוץ לפונקציה (לדוגמה השמעת id_list_message, יציאה מהשלוחה ואז ניתוק) היה מפעיל את הפונקציה.
4649
</details>
4750

4851
<details>

lib/yemot_router.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ function YemotRouter (options = {}) {
9595
let currentCall = activeCalls[callId];
9696
if (!currentCall) {
9797
isNewCall = true;
98+
if (req.query.hangup === 'yes') {
99+
logger(callId, '👋 call is hangup (outside the function)');
100+
return res.json({ message: 'hangup' });
101+
}
98102
currentCall = new Call(callId, eventsEmitter, ops);
99103
activeCalls[callId] = currentCall;
100104
logger(callId, `📞 new call from ${req.query.ApiPhone}`);

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "yemot-router2",
3-
"version": "5.1.0",
3+
"version": "5.1.1",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)