Skip to content

Commit

Permalink
При сохранении региона обновляем онлайн-пользователей, у которых он н…
Browse files Browse the repository at this point in the history
…е только домашний, но и в списке по умолчанию или модерируемый
  • Loading branch information
klimashkin committed Jan 13, 2014
1 parent fe84b28 commit 44bea88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ module.exports = function (grunt) {
options: {
archive: upperDir + 'app<%= pkg.version %>.zip',
mode: 'zip',
level: 9
level: 9,
forceUTC: true,
comment: 'This PastVu application builded and compressed with Grunt'
},
files: [
{expand: true, cwd: targetDir, src: ['**/*'/*, '!node_modules*//**//**'*/], dest: 'app'}
Expand Down
6 changes: 4 additions & 2 deletions controllers/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,11 @@ function saveRegion(socket, data, cb) {
}
}

//Обновляем онлайн-пользователей, у которых установлен данный домашний регион
//Обновляем онлайн-пользователей, у которых данный регион установлен как домашний или фильтруемый по умолчанию или модерируемый
_session.regetUsers(function (user) {
return user.user.regionHome && user.user.regionHome.cid === region.cid;
return user.rhash && user.rhash[region.cid] ||
user.mod_rhash && user.mod_rhash[region.cid] ||
user.user.regionHome && user.user.regionHome.cid === region.cid;
}, true);

cb({childLenArr: childLenArr, region: region, resultStat: resultStat});
Expand Down

0 comments on commit 44bea88

Please sign in to comment.