Sfoglia il codice sorgente

Skeleton method for sending inAppNotification

https://youtrack.weseek.co.jp/issue/GW-7776
- Add getMentionedUsers method
- Add sendNotificationToMentionedUsers method
I Komang Mudana 3 anni fa
parent
commit
c44776e0fd
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12 0
      packages/app/src/server/service/comment.ts

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

@@ -104,6 +104,18 @@ class CommentService {
     await this.inAppNotificationService.emitSocketIo(targetUsers);
     await this.inAppNotificationService.emitSocketIo(targetUsers);
   };
   };
 
 
+  private getMentionedUsers = async(comment: string) => {
+    // TODO extract users from comment
+    // return User ObjectID array
+  }
+
+  private sendNotificationToMentionedUsers = async(mentionedUsers: Types.ObjectId[], activity:any, page:any) => {
+    // TODO implement inAppNotificationService with target mentioned users
+    // inAppNotificationService.upsertByActivity
+    // Call inAppNotificationService.emitSocketIo;
+  }
+
 }
 }
 
 
+
 module.exports = CommentService;
 module.exports = CommentService;