mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 17:23:25 +03:00
Add preferences tab to user settings, add subscribe to own cards option
This commit is contained in:
@@ -49,6 +49,17 @@ module.exports = {
|
||||
boardId: inputs.list.boardId,
|
||||
}).fetch();
|
||||
|
||||
if (inputs.user.subscribeToOwnCards) {
|
||||
await CardSubscription.create({
|
||||
cardId: card.id,
|
||||
userId: inputs.user.id,
|
||||
}).tolerate('E_UNIQUE');
|
||||
|
||||
card.isSubscribed = true;
|
||||
} else {
|
||||
card.isSubscribed = false;
|
||||
}
|
||||
|
||||
sails.sockets.broadcast(
|
||||
`board:${card.boardId}`,
|
||||
'cardCreate',
|
||||
|
||||
Reference in New Issue
Block a user