Built motion from commit d3d6ca497.|1.0.32
[motion.git] / server / models / user.js
index 623dcf4..1866eea 100644 (file)
@@ -758,9 +758,19 @@ module.exports = function(sequelize, DataTypes) {
     phoneBarUnansweredCallBadge: {
       type: DataTypes.BOOLEAN,
       defaultValue: true
+    },
+    phonebarEnableDtmfTone: {
+      type: DataTypes.BOOLEAN,
+      defaultValue: false
+    },
+    phonebarAutoAnswerDelay: {
+      type: DataTypes.INTEGER,
+      defaultValue: 0
     }
   }, {
     tableName: 'users',
+    charset: 'utf8',
+    collate: 'utf8_bin',
     instanceMethods: {
       /**
        * Authenticate - check if the passwords are the same
@@ -1020,7 +1030,9 @@ module.exports = function(sequelize, DataTypes) {
           'phoneBarDnd',
           'phoneBarUnansweredCallBadge',
           'phone',
-          'mobile'
+          'mobile',
+          'phonebarEnableDtmfTone',
+          'phonebarAutoAnswerDelay'
         ]
       });
       User.addScope('telephone', {
@@ -1135,33 +1147,24 @@ module.exports = function(sequelize, DataTypes) {
             'phoneBarRemoteControl',
             'phoneBarRemoteControlPort',
             'loginInPause',
-            'showWebBar'
+            'showWebBar',
+            'phonebarEnableDtmfTone',
+            'phonebarAutoAnswerDelay'
           ],
           include: [{
             model: models.Module,
+            attributes: ['id', 'path'],
             include: [{
               model: models.Module,
+              attributes: ['id', 'path'],
               as: 'SubModules',
               required: false,
               include: [{
-                all: true
+                model: models.Module,
+                attributes: ['id', 'path'],
+                as: 'SubModules'
               }]
             }]
-          }, {
-            model: models.VoiceQueue,
-            as: 'PVoiceQueues'
-          }, {
-            model: models.ChatQueue,
-            as: 'PChatQueues'
-          }, {
-            model: models.MailQueue,
-            as: 'PMailQueues'
-          }, {
-            model: models.FaxQueue,
-            as: 'PFaxQueues'
-          }, {
-            model: models.SmsQueue,
-            as: 'PSmsQueues'
           }]
         };
         return scope;