c596e12495a323f0b36555a67d8c896ee5340ee7
[motion.git] / server / config / triggers / chat.js
1 var _0x2200=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x54\x72\x69\x67\x67\x65\x72\x20\x43\x68\x61\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x5B\x43\x68\x61\x74\x5D\x20\x4E\x65\x77\x20\x45\x6E\x71\x75\x69\x72\x79","\x69\x64","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x66\x6F\x72\x77\x61\x72\x64\x69\x6E\x67\x5F\x61\x64\x64\x72\x65\x73\x73","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x43\x68\x61\x74\x5D\x20\x45\x6E\x71\x75\x69\x72\x79\x20\x66\x6F\x72\x77\x61\x72\x64\x20\x66\x61\x69\x6C\x65\x64\x3A\x20\x53\x4D\x54\x50\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x20\x77\x72\x6F\x6E\x67\x20\x66\x6F\x72\x20\x73\x65\x72\x76\x69\x63\x65\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x63\x68\x65\x63\x6B\x20\x79\x6F\x75\x72\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x5B\x43\x68\x61\x74\x5D\x20\x45\x6E\x71\x75\x69\x72\x79\x20\x66\x6F\x72\x77\x61\x72\x64\x20\x66\x61\x69\x6C\x65\x64\x3A\x20\x4E\x6F\x20\x73\x65\x72\x76\x69\x63\x65\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x2E\x20\x50\x6C\x65\x61\x73\x65\x20\x63\x68\x65\x63\x6B\x20\x79\x6F\x75\x72\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x72\x65\x6E\x64\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x6E\x61\x6D\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x66\x6F\x72\x77\x61\x72\x64\x69\x6E\x67","\x5B\x43\x68\x61\x74\x5D\x20\x45\x6E\x71\x75\x69\x72\x79\x20\x66\x6F\x72\x77\x61\x72\x64\x20\x69\x73\x20\x73\x65\x74\x20\x66\x6F\x72\x20\x74\x68\x69\x73\x20\x77\x65\x62\x73\x69\x74\x65","\x67\x65\x74\x4F\x66\x66\x6C\x69\x6E\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x5B\x43\x68\x61\x74\x5D\x20\x45\x6E\x71\x75\x69\x72\x79\x20\x66\x6F\x72\x77\x61\x72\x64\x20\x69\x73\x20\x6E\x6F\x74\x20\x73\x65\x74\x20\x66\x6F\x72\x20\x74\x68\x69\x73\x20\x77\x65\x62\x73\x69\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x61\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x61\x74\x63\x68","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x31","\x75\x70\x64\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x43\x4C\x4F\x53\x45\x44","\x65\x78\x70\x6F\x72\x74\x73"];_0x2200[0];const _=require(_0x2200[1]);const rp=require(_0x2200[2]);const Mustache=require(_0x2200[3]);const Template=require(_0x2200[5])[_0x2200[4]];const ChatRoom=require(_0x2200[5])[_0x2200[6]];const ChatEnquiry=require(_0x2200[5])[_0x2200[7]];const ChatWebsite=require(_0x2200[5])[_0x2200[8]];const MailMessage=require(_0x2200[5])[_0x2200[9]];const MailAccount=require(_0x2200[5])[_0x2200[10]];const MailServerOut=require(_0x2200[5])[_0x2200[11]];function Chat(){console[_0x2200[13]](_0x2200[12]);ChatEnquiry[_0x2200[35]](function(_0xd387xc,_0xd387xd){var _0xd387xe=_0xd387xc;var _0xd387xf;var _0xd387x10;var _0xd387x11;console[_0x2200[13]](_0x2200[14],_0xd387xc[_0x2200[15]]);return ChatWebsite[_0x2200[34]](_0xd387xc.ChatWebsiteId)[_0x2200[25]](function(_0xd387x14){_0xd387xf= _0xd387x14;_0xd387xe[_0x2200[28]]= _0xd387xf[_0x2200[29]];if(_0xd387xf[_0x2200[30]]&& _0xd387xf[_0x2200[17]]){console[_0x2200[13]](_0x2200[31],_0xd387xf[_0x2200[29]]);return _0xd387xf[_0x2200[32]]()}else {console[_0x2200[13]](_0x2200[33],_0xd387xf[_0x2200[29]]);return null}})[_0x2200[25]](function(_0xd387x13){_0xd387x11= _0xd387x13;if(_0xd387x11){_0xd387x11[_0x2200[19]]= Mustache[_0x2200[26]](_0xd387x11[_0x2200[19]],_0xd387xe);_0xd387x11[_0x2200[18]]= Mustache[_0x2200[26]](_0xd387x11[_0x2200[18]],_0xd387xe);return MailAccount[_0x2200[27]]({where:{service:true},include:[{model:MailServerOut}]})}else {return null}})[_0x2200[25]](function(_0xd387x12){if(_0xd387x12){if(_0xd387x12[_0x2200[11]]&& _0xd387x12[_0x2200[11]][_0x2200[16]]){return MailMessage[_0x2200[21]]({from:[_0xd387x12[_0x2200[11]][_0x2200[16]]],to:[_0xd387xf[_0x2200[17]]],subject:_0xd387x11[_0x2200[18]],html:_0xd387x11[_0x2200[19]]},{transaction:_0xd387xd?_0xd387xd[_0x2200[20]]:null})}else {console[_0x2200[23]](_0x2200[22])}}else {console[_0x2200[23]](_0x2200[24])};return})})}Chat[_0x2200[37]][_0x2200[36]]= function(_0xd387x15,_0xd387x16){return ChatRoom[_0x2200[42]]({tags:_0xd387x15[_0x2200[41]][_0x2200[40]](_0x2200[39])},{where:{id:_0xd387x16[_0x2200[15]]}})[_0x2200[38]](function(_0xd387x17){console[_0x2200[23]](_0xd387x17)})};Chat[_0x2200[37]][_0x2200[43]]= function(_0xd387x15,_0xd387x16){return ChatRoom[_0x2200[42]]({status:_0x2200[44],disposition:_0xd387x15[_0x2200[41]]|| null},{individualHooks:true,where:{id:_0xd387x16[_0x2200[15]]}})[_0x2200[38]](function(_0xd387x17){console[_0x2200[23]](_0xd387x17)})};module[_0x2200[45]]= Chat