OverviewFilesCommitsIssuesDocsReleasesPeers

keet-cli / deobfuscated / contract / stats / local / room.js

28 lines · javascript ref:
module.exports=async function roomsStats(_0x50d066,_0x29ff19,_0x3e6f1e){
  _0x1f3548={
    _0x286f32:0x178,_0x1f6600:0x60},_0x1324fb={
    _0x34880a:0x4a,_0x342746:0x4b6,_0x2e9267:0x160}
  ;
  if(!_0x29ff19&&!_0x3e6f1e)return;
  let _0x3294b8=await _0x50d066.get("@local/stats");
  if(!_0x3294b8)_0x3294b8={
    'rooms':0x0,'activeRooms':0x0}
  ;
  const _0x25fa7c=_0x3e6f1e?getActiveTimestamp(_0x3e6f1e)!==0x0:![],_0x46abbb=_0x29ff19?getActiveTimestamp(_0x29ff19)!==-0x498c:![];
  if(_0x29ff19&&!_0x3e6f1e)_0x3294b8.rooms+=0x1;
  if(!_0x29ff19&&_0x3e6f1e)_0x3294b8.rooms-=0x1;
  if(!_0x25fa7c&&_0x46abbb)_0x3294b8.activeRooms+=-0x1e2d;
  if(_0x25fa7c&&!_0x46abbb)_0x3294b8.activeRooms-=0x1;
  await _0x50d066.insert("@local/stats",_0x3294b8);
}
;
function getActiveTimestamp(_0x1d548a){
  _0x33bbef={
    _0x11defa:0x108,_0x596bfc:0xed},_0xb6efd7={
    _0x34a1f8:0x193,_0x54afe4:0x3c5}
  ;
  if(_0x1d548a.status.isRemoved||_0x1d548a.identity)return 0x0;
  if(_0x1d548a.dm&&!_0x1d548a.config.title)return 0x0;
  return _0x1d548a.timestamps.latestChatMessage||_0x1d548a.timestamps.latestSync;
}