VirtusLab-Open-Source / strapi-plugin-comments

A plugin for Strapi Headless CMS that provides end to end comments feature with their moderation panel, bad words filtering, abuse reporting and more.
MIT License
407 stars 63 forks source link

[CU-20xz3qe] Moderator can respond to the comment via admin panel #55

Closed cyp3rius closed 1 year ago

cyp3rius commented 3 years ago
  1. Answer should be marked as "moderator" without linking to any existing user. It shouldn't take into account users configuration of plugin.
kwiat1990 commented 2 years ago

Hi, how should it work exactly?

I think it would come in quite handy if a Strapi user could become one of N roles defined in comment plugin and respond to comments from the dashboard. So, for example I'm a super admin and I would give myself a moderator role in comment plugin. The same I would grant a Strapi user with the author role an author role in comment plugin.

To be honest I want to build such functionality in my frontend, so I can mark the author and the moderator with a label or something similar. This would be just another option for Strapi user to respond to comment.

So generally speaking, there are two functionalities:

  1. Possibility to respond to comment direct from the dashboard aka admin panel.
  2. Possibility to give a Strapi users one of roles (I would say roles should be defined by plugins users), which would be added to their comment object and then could be easily consumed by the fronted.
kwiat1990 commented 1 year ago

Hi, I have tried responding direct from the panel (version 2.2.0) but the author object won't get populated completely:

{
  avatar: null,
  email: "lorem@ipsum.com",
  id: "1",
  name: null
}

Despite the fact that this user is a super admin and does have first and last name, they both are ignored. What's more, right know there is no indicator that this comment comes from the admin or a staff member.

cyp3rius commented 1 year ago

Will investigate this @kwiat1990 and provide fix.