From 8f65b0de2f35a6e250d0d755502f1d8e581382e7 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Fri, 18 Sep 2020 09:12:31 -0400 Subject: [PATCH] bugfix #21: multiple teams target --- lib/tasks/dial.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/tasks/dial.js b/lib/tasks/dial.js index 13a467a8..fac79b7c 100644 --- a/lib/tasks/dial.js +++ b/lib/tasks/dial.js @@ -37,12 +37,13 @@ function compareTasks(t1, t2) { if (t1.type !== t2.type) return false; switch (t1.type) { case 'phone': - return t1.number === t1.number; + return t1.number === t2.number; case 'user': + return t1.name === t2.name; case 'teams': - return t2.name === t1.name; + return t1.number === t2.number; case 'sip': - return t2.sipUri === t1.sipUri; + return t1.sipUri === t2.sipUri; } }