mirror of
https://github.com/wekan/wekan.git
synced 2026-03-05 21:30:17 +01:00
Change our presence package
tmeasday:presence was doing unnecessary ping calls to the server every 5 seconds instead of using the status of the DDP connection (this could save a fair amount of traffic in case of important server load). I guess this change also fixes #221, but since no issue reproduction was provided, it's difficult to tell.
This commit is contained in:
parent
40fafd4b14
commit
521e661dcb
7 changed files with 12 additions and 12 deletions
|
|
@ -16,7 +16,7 @@ Template.userAvatar.helpers({
|
|||
},
|
||||
|
||||
presenceStatusClassName() {
|
||||
const userPresence = Presences.findOne({ userId: this.userId });
|
||||
const userPresence = presences.findOne({ userId: this.userId });
|
||||
if (!userPresence)
|
||||
return 'disconnected';
|
||||
else if (Session.equals('currentBoard', userPresence.state.currentBoardId))
|
||||
|
|
|
|||
7
client/config/presence.js
Normal file
7
client/config/presence.js
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Presence.configure({
|
||||
state() {
|
||||
return {
|
||||
currentBoardId: Session.get('currentBoard'),
|
||||
};
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue