|
|
@@ -25,7 +25,7 @@ import { preNotifyService, type PreNotify } from './pre-notify';
|
|
|
import { RoomPrefix, getRoomNameWithId } from './socket-io/helper';
|
|
|
|
|
|
|
|
|
-const { STATUS_UNREAD, STATUS_UNOPENED, STATUS_OPENED } = InAppNotificationStatuses;
|
|
|
+const { STATUS_UNOPENED, STATUS_OPENED } = InAppNotificationStatuses;
|
|
|
|
|
|
const logger = loggerFactory('growi:service:inAppNotification');
|
|
|
|
|
|
@@ -147,14 +147,6 @@ export default class InAppNotificationService {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
- read = async function(user: Types.ObjectId): Promise<void> {
|
|
|
- const query = { user, status: STATUS_UNREAD };
|
|
|
- const parameters = { status: STATUS_UNOPENED };
|
|
|
- await InAppNotification.updateMany(query, parameters);
|
|
|
-
|
|
|
- return;
|
|
|
- };
|
|
|
-
|
|
|
open = async function(user: IUser & HasObjectId, id: Types.ObjectId): Promise<void> {
|
|
|
const query = { _id: id, user: user._id };
|
|
|
const parameters = { status: STATUS_OPENED };
|