mirror of
https://github.com/plankanban/planka.git
synced 2025-12-18 01:11:13 +03:00
fix: Subscribe only when needed
This commit is contained in:
@@ -11,6 +11,9 @@ module.exports = {
|
||||
regex: /^[0-9]+$/,
|
||||
required: true,
|
||||
},
|
||||
subscribe: {
|
||||
type: 'boolean',
|
||||
},
|
||||
},
|
||||
|
||||
exits: {
|
||||
@@ -73,8 +76,8 @@ module.exports = {
|
||||
card.isSubscribed = isSubscribedByCardId[card.id] || false;
|
||||
});
|
||||
|
||||
if (this.req.isSocket) {
|
||||
sails.sockets.join(this.req, `board:${board.id}`); // TODO: only when subscription needed
|
||||
if (inputs.subscribe && this.req.isSocket) {
|
||||
sails.sockets.join(this.req, `board:${board.id}`);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user