@@ -122,7 +122,7 @@ export default class Notifications {
|
||||
],
|
||||
});
|
||||
if (!collection) return;
|
||||
if (collection.private) return;
|
||||
if (!collection.permission) return;
|
||||
|
||||
const notificationSettings = await NotificationSetting.findAll({
|
||||
where: {
|
||||
|
||||
@@ -64,7 +64,7 @@ describe("documents.publish", () => {
|
||||
const user = await buildUser();
|
||||
const collection = await buildCollection({
|
||||
teamId: user.teamId,
|
||||
private: true,
|
||||
permission: null,
|
||||
});
|
||||
const document = await buildDocument({
|
||||
teamId: user.teamId,
|
||||
|
||||
@@ -157,9 +157,9 @@ export default class Websockets {
|
||||
|
||||
socketio
|
||||
.to(
|
||||
collection.private
|
||||
? `collection-${collection.id}`
|
||||
: `team-${collection.teamId}`
|
||||
collection.permission
|
||||
? `team-${collection.teamId}`
|
||||
: `collection-${collection.id}`
|
||||
)
|
||||
.emit("entities", {
|
||||
event: event.name,
|
||||
@@ -173,9 +173,9 @@ export default class Websockets {
|
||||
|
||||
return socketio
|
||||
.to(
|
||||
collection.private
|
||||
? `collection-${collection.id}`
|
||||
: `team-${collection.teamId}`
|
||||
collection.permission
|
||||
? `team-${collection.teamId}`
|
||||
: `collection-${collection.id}`
|
||||
)
|
||||
.emit("join", {
|
||||
event: event.name,
|
||||
|
||||
Reference in New Issue
Block a user