1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x1619=['privacyEnabled','then','catch','../../config/logger','moment','bluebird','request-promise','rimraf','./userProfile.attributes','define','user_profiles','models','update'];(function(_0x413feb,_0x10477f){var _0x40ee88=function(_0x32a3f6){while(--_0x32a3f6){_0x413feb['push'](_0x413feb['shift']());}};_0x40ee88(++_0x10477f);}(_0x1619,0x189));var _0x9161=function(_0x2d7f97,_0x129956){_0x2d7f97=_0x2d7f97-0x0;var _0x46cb6a=_0x1619[_0x2d7f97];return _0x46cb6a;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x9161('0x0'))('api');var moment=require(_0x9161('0x1'));var BPromise=require(_0x9161('0x2'));var rp=require(_0x9161('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9161('0x4'));var config=require('../../config/environment');var attributes=require(_0x9161('0x5'));module['exports']=function(_0x50ed78,_0x1b006d){return _0x50ed78[_0x9161('0x6')]('UserProfile',attributes,{'tableName':_0x9161('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x1f8240,_0x4f3e87,_0x25bea9){var _0x540f94=_0x50ed78[_0x9161('0x8')];_0x540f94['User'][_0x9161('0x9')]({'privacyEnabled':_0x1f8240[_0x9161('0xa')]},{'where':{'UserProfileId':_0x1f8240['id']}})[_0x9161('0xb')](function(){_0x25bea9();})[_0x9161('0xc')](function(_0x37dcc7){_0x25bea9(_0x37dcc7);});}}});};