Skip to content

Commit

Permalink
Merge pull request #4608 from coralproject/develop
Browse files Browse the repository at this point in the history
v9.0.4
  • Loading branch information
tessalt authored May 1, 2024
2 parents 04434c3 + f19f05b commit af8ea5b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coralproject/talk",
"version": "9.0.3",
"version": "9.0.4",
"author": "The Coral Project",
"homepage": "https://coralproject.net/",
"sideEffects": [
Expand Down
2 changes: 1 addition & 1 deletion client/src/core/client/stream/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ export const ViewConversationEvent = createViewerEvent<{
*/
export const ViewNotificationsFeedEvent = createViewerEvent<{
userID?: string;
}>("viewNotificationsFeedEvent");
}>("viewNotificationsFeed");

/**
* This event is emitted when the viewer clicks
Expand Down
2 changes: 1 addition & 1 deletion common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "common",
"version": "9.0.3",
"version": "9.0.4",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "common",
"version": "9.0.3",
"version": "9.0.4",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@coralproject/talk",
"version": "9.0.3",
"version": "9.0.4",
"author": "The Coral Project",
"homepage": "https://coralproject.net/",
"sideEffects": [
Expand Down
8 changes: 6 additions & 2 deletions server/src/core/server/stacks/approveComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { retrieveNotificationByCommentReply } from "coral-server/models/notifica
import { Tenant } from "coral-server/models/tenant";
import { retrieveUser } from "coral-server/models/user";
import { retrieveComment } from "coral-server/services/comments";
import { moderate } from "coral-server/services/comments/moderation";
import {
moderate,
PENDING_STATUS,
} from "coral-server/services/comments/moderation";
import { I18n } from "coral-server/services/i18n";
import { InternalNotificationContext } from "coral-server/services/notifications/internal/context";
import { AugmentedRedis } from "coral-server/services/redis";
Expand Down Expand Up @@ -93,7 +96,8 @@ const approveComment = async (
}
}

if (createNotification) {
// only create notification upon approval of comments with previous pending status
if (createNotification && PENDING_STATUS.includes(result.before.status)) {
await notifications.create(tenant.id, tenant.locale, {
targetUserID: result.after.authorID!,
comment: result.after,
Expand Down

0 comments on commit af8ea5b

Please sign in to comment.