Преглед изворни кода

Merge pull request #5882 from weseek/feat/gw7776-implement-empty-method

Feat/gw7776 implement empty method
Yuki Takei пре 3 година
родитељ
комит
0847234160
1 измењених фајлова са 11 додато и 0 уклоњено
  1. 11 0
      packages/app/src/server/service/comment.ts

+ 11 - 0
packages/app/src/server/service/comment.ts

@@ -99,11 +99,22 @@ class CommentService {
     let targetUsers: Types.ObjectId[] = [];
     let targetUsers: Types.ObjectId[] = [];
     targetUsers = await activity.getNotificationTargetUsers();
     targetUsers = await activity.getNotificationTargetUsers();
 
 
+    // TODO get mentioned users from comment
+    // const mentionedUsers = await this.getMentionedUsers(page.event);
+    // targetUsers = targetUsers.concat(mentionedUsers);
     // Create and send notifications
     // Create and send notifications
     await this.inAppNotificationService.upsertByActivity(targetUsers, activity, snapshot);
     await this.inAppNotificationService.upsertByActivity(targetUsers, activity, snapshot);
     await this.inAppNotificationService.emitSocketIo(targetUsers);
     await this.inAppNotificationService.emitSocketIo(targetUsers);
   };
   };
 
 
+  private getMentionedUsers = async(comment: Types.ObjectId) => {
+    // TODO extract users from comment model
+    // Implement User model to find users ID
+
+    // return User ObjectID array
+  }
+
 }
 }
 
 
+
 module.exports = CommentService;
 module.exports = CommentService;