From 0b22d9155d2d35a06ca4ecd9a33b9da2d6609d59 Mon Sep 17 00:00:00 2001
From: Lukas Haase <lukas.haase@mni.thm.de>
Date: Wed, 18 Aug 2021 14:16:09 +0200
Subject: [PATCH] when calling created by moderator filter it'll request the
 user roles and print them in the console.

---
 .../comment-list/comment-list.component.ts       | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/app/components/shared/comment-list/comment-list.component.ts b/src/app/components/shared/comment-list/comment-list.component.ts
index f2349930f..71d15e4a0 100644
--- a/src/app/components/shared/comment-list/comment-list.component.ts
+++ b/src/app/components/shared/comment-list/comment-list.component.ts
@@ -428,6 +428,22 @@ export class CommentListComponent implements OnInit, OnDestroy {
           return c.createdFromLecturer;
       }
     });
+    const testForModerator=()=>{
+      this.comments.forEach(e=>{
+        this.commentService.role(e).subscribe(i=>{
+          console.log(e,i);
+        });
+      });
+    };
+    if(type==='moderator'){
+      console.log(
+        'TEST moderator',
+        this.moderatorIds,
+        this.user,
+        this.room
+      );
+      testForModerator();
+    }
     this.hideCommentsList = true;
     this.sortComments(this.currentSort);
   }
-- 
GitLab