Skip to content

Commit

Permalink
fix: default comments notification set to mentions-and-replies
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 722aabffe159803b261b2c21154dac2139c3b72e
  • Loading branch information
abbas-nazar authored and actions-user committed Jan 10, 2025
1 parent e8e743a commit 54911e2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { observer } from "mobx-react";
import * as React from "react";
import { useState } from "react";

export const DEFAULT_NOTIFICATION_LEVEL = "none";
export const DEFAULT_NOTIFICATION_LEVEL = "mentions-and-replies";
export const notifyAboutKeyToLabel = {
all: "All comments",
"mentions-and-replies": "Replies only",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ async function processUserForProject(
project: Project,
notificationsByUser: UserProjectRecord
) {
const notificationSettings = await dbManager.tryGetNotificationSettings(
user.id,
toOpaque(projectId)
);

if (!notificationSettings) {
const notificationSettings: ApiNotificationSettings =
(await dbManager.tryGetNotificationSettings(
user.id,
toOpaque(projectId)
)) || {
notifyAbout: "mentions-and-replies",
};

if (notificationSettings.notifyAbout === "none") {
return;
}

Expand Down

0 comments on commit 54911e2

Please sign in to comment.