Skip to content

Commit 54911e2

Browse files
abbas-nazaractions-user
authored andcommitted
fix: default comments notification set to mentions-and-replies
GitOrigin-RevId: 722aabffe159803b261b2c21154dac2139c3b72e
1 parent e8e743a commit 54911e2

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

platform/wab/src/wab/client/components/comments/CommentsTab.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { observer } from "mobx-react";
2323
import * as React from "react";
2424
import { useState } from "react";
2525

26-
export const DEFAULT_NOTIFICATION_LEVEL = "none";
26+
export const DEFAULT_NOTIFICATION_LEVEL = "mentions-and-replies";
2727
export const notifyAboutKeyToLabel = {
2828
all: "All comments",
2929
"mentions-and-replies": "Replies only",

platform/wab/src/wab/server/scripts/send-comments-notifications.ts

+9-6
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,15 @@ async function processUserForProject(
9797
project: Project,
9898
notificationsByUser: UserProjectRecord
9999
) {
100-
const notificationSettings = await dbManager.tryGetNotificationSettings(
101-
user.id,
102-
toOpaque(projectId)
103-
);
104-
105-
if (!notificationSettings) {
100+
const notificationSettings: ApiNotificationSettings =
101+
(await dbManager.tryGetNotificationSettings(
102+
user.id,
103+
toOpaque(projectId)
104+
)) || {
105+
notifyAbout: "mentions-and-replies",
106+
};
107+
108+
if (notificationSettings.notifyAbout === "none") {
106109
return;
107110
}
108111

0 commit comments

Comments
 (0)