Browse Source

UI-1222: Fixed small issue with Caller-ID feature + Updating the user after removing a DID

4.3
Jean-Roch Maitre 11 years ago
parent
commit
6ee2583dcd
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      submodules/users/users.js

+ 1
- 5
submodules/users/users.js View File

@ -991,17 +991,13 @@ define(function(require){
// If we deleted a number that was used as the Caller-ID , disable the Caller-ID feature.
var needUpdateUser = false;
if(currentUser.caller_id.hasOwnProperty('internal') && dataNumbers.indexOf(currentUser.caller_id.internal.number) < 0) {
delete currentUser.caller_id.internal.number;
needUpdateUser = true;
}
if(currentUser.caller_id.hasOwnProperty('external') && dataNumbers.indexOf(currentUser.caller_id.external.number) < 0) {
delete currentUser.caller_id.external.number;
needUpdateUser = true;
}
if(needUpdateUser) {
self.usersUpdateUser(user, function() {
self.usersUpdateUser(currentUser, function() {
updateCallflow();
});
}


Loading…
Cancel
Save