Skip to content

Conversation

@Dnouv
Copy link
Member

@Dnouv Dnouv commented Apr 18, 2023

Proposed changes (including videos or screenshots)

Release PR for the feat/moderation-dashboard implementing the Beta version of the Moderation Console. For more details & some previews on Moderation Console, read here -> #27961 (comment)

Issue(s)

Steps to test or reproduce

Further comments

Dnouv and others added 28 commits March 20, 2023 18:36
* draft getreports api

* prettier

* fix lint error

* fix lint error

* fix lint error

* add raw model

* fix prop type

* fix lint

* add oldest undefine check

* test

* fix offset and count

* add new migration and fix report history api

* add e2e tests

* check array and remove API failure and change the migration version

* add hidebyid endpoint

* add hidebymid method

* add test for report hide

* fix build

* add moderation.info enfpoint and hiddenby fields

* add test for mdoeration.info

* fix e2e tests

* add new property in reporthistoryprop

* moderation.history -> moderation.getReports

* moderation.hide -> moderation.markChecked

* moderation.info -> moderation.reportsByMessage

* add additional sort param

* add query param

* remove deprecated query

* add single report detail endpoint

* fix link

* add test for new API

* add reportedBy user details

* fix type error and add new count api endpoint

* fix type error

* fix count api return value

* add query to group together reported messages based on message content

* update test

* add totalcounts for grouped results

* reduce data overload

* add new count field

* update IReport schema and support new fields in Moderation method

* try to fix error

* revert grouping by message content

* update moderation interface

* fix type error

* add moderation.user.getMessageHistory endpoint

* avoid duplicated messsages

* fix hidereport api

* fix reportsbymsg endpoint

* flag deleteMessage method as deprecated

* add reported message delete endpoint

* add new permissions to the deactivate & reset emoji enfpoints

* fix test and try out to append roomnames

* fix api errors

* add roomname append query

* update the ireport schema and also the report function

* add more fields in schema

* reduce aggregation calls

* fix return type of API calls

* fix tests and deleteReportedMessages method

* add intial migration logic

* try to fix type error in moderation.ts

* fix the typescript error, and remove migration logic

* fix setActiveStatus persmission

* fix projection

* add count propoerty in IModerationAudit

* add _id to usermessages

* fix deletmessage function

* add new function for reportMessage, deprecate the reportMessage method, try to fix test

---------

Co-authored-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
* draft getreports api

* prettier

* fix lint error

* fix lint error

* fix lint error

* add raw model

* fix prop type

* fix lint

* add oldest undefine check

* test

* fix offset and count

* add new migration and fix report history api

* add e2e tests

* check array and remove API failure and change the migration version

* add hidebyid endpoint

* add hidebymid method

* add test for report hide

* fix build

* add moderation.info enfpoint and hiddenby fields

* add test for mdoeration.info

* fix e2e tests

* add new property in reporthistoryprop

* moderation.history -> moderation.getReports

* moderation.hide -> moderation.markChecked

* moderation.info -> moderation.reportsByMessage

* add additional sort param

* add query param

* remove deprecated query

* add single report detail endpoint

* fix link

* add test for new API

* add reportedBy user details

* fix type error and add new count api endpoint

* fix type error

* fix count api return value

* add query to group together reported messages based on message content

* update test

* add totalcounts for grouped results

* reduce data overload

* add new count field

* update IReport schema and support new fields in Moderation method

* try to fix error

* revert grouping by message content

* update moderation interface

* fix type error

* add moderation.user.getMessageHistory endpoint

* avoid duplicated messsages

* fix hidereport api

* fix reportsbymsg endpoint

* flag deleteMessage method as deprecated

* add reported message delete endpoint

* add new permissions to the deactivate & reset emoji enfpoints

* fix test and try out to append roomnames

* fix api errors

* add roomname append query

* update the ireport schema and also the report function

* add more fields in schema

* reduce aggregation calls

* fix return type of API calls

* fix tests and deleteReportedMessages method

* add intial migration logic

* try to fix type error in moderation.ts

* fix the typescript error, and remove migration logic

* fix setActiveStatus persmission

* fix projection

* add count propoerty in IModerationAudit

* add _id to usermessages

* fix deletmessage function

* add new function for reportMessage, deprecate the reportMessage method, try to fix test

---------

Co-authored-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
* fix reportmessage import and archivereportprop

* add routes and sample fetch data

* define the moderation console table row

* add raw context

* add groupBymsg function and resolve TS errors

* show messages

* fix import warnings and introduce a new count api

* add reporter user details

* add some helpers

* fix the moderator actions mutation call, and introduce new context bar

* add new message body for parsing mod console messages

* add reports vertical context bar

* add arg to different acttions

* fix refresh data after actions

* add message redirect function

* change 'view reports'

* create hooks for moderation actions

* remove footer - not working as expected

* add a date range picker

* add callout

* fix today's report not showing up on console

* add delete single message option

* fix modal not closing

* fix refetching data on individual delete

* add context bar actionss

* add i18n keys

* i missed the 'duplicate messages'

* add username column

* add new permission to show workspace with moderation permission

* remove await from reset avatar

* fix lint error

* resize avatar

* fix type fail for moderation files

* respect UI_use_real_name setting

* lightning <-> warning ico

* fix daterangegpicker

* add a extra option to navigate to moderation console

* fix use real name setting respect

* add a moderate. to query names

* moderationalize the i18ns

* fix avatar stretch

* remove capital words & add a beta tag

* beta <-> alpha tag

* fix context bar header

* close context bar after deleting all messages & hide footer for no results

* fix order of view reported messages option & no open new tabs

* close context bar on report dismiss and add a beta tag

* fix contextmessage ireport <-> imoderationreport

* fix lint

* add confirmrelinquish option
@codecov
Copy link

codecov bot commented Apr 18, 2023

Codecov Report

Merging #28962 (3deb547) into release-6.2.0 (ff594c6) will increase coverage by 0.09%.
The diff coverage is 75.00%.

Impacted file tree graph

@@                Coverage Diff                @@
##           release-6.2.0   #28962      +/-   ##
=================================================
+ Coverage          46.89%   46.98%   +0.09%     
=================================================
  Files                728      729       +1     
  Lines              13864    13876      +12     
  Branches            2194     2196       +2     
=================================================
+ Hits                6501     6520      +19     
+ Misses              7051     7042       -9     
- Partials             312      314       +2     
Flag Coverage Δ
e2e 46.95% <75.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@ggazzo ggazzo force-pushed the feat/moderation-dashboard branch from 04c2f28 to 83a6dc5 Compare April 25, 2023 12:17
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label Apr 25, 2023
@ggazzo
Copy link
Member

ggazzo commented Apr 25, 2023

sorry I synced with develop I didnt see the main branch was 6.2.0 thats why the push force

Copy link
Member

@ggazzo ggazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, please check my comments. Beside that I'm a 99.9% sure the implementation considering 'owner', 'moderator' roles are not working as expected, if we want to allow room owners to moderate messages its going to require extra page ( or at least an extra context on the current ModerationConsoleTable) considering the roomId on the moderation.reportsByUsers endpoints as well.

and be careful to not allow one room owner(and not a admint) to be able to see reports from other rooms.

@casalsgh casalsgh requested a review from ggazzo April 26, 2023 13:08
@murtaza98 murtaza98 removed the request for review from a team May 4, 2023 12:45
ggazzo
ggazzo previously approved these changes May 5, 2023
d-gubert
d-gubert previously approved these changes May 5, 2023
Copy link
Member

@d-gubert d-gubert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good on apps side 👍

@d-gubert d-gubert requested a review from ggazzo May 5, 2023 16:27
ggazzo
ggazzo previously approved these changes May 5, 2023
@d-gubert d-gubert dismissed stale reviews from ggazzo and themself via 3deb547 May 5, 2023 20:03
@ggazzo ggazzo merged commit 9829a8a into release-6.2.0 May 8, 2023
@ggazzo ggazzo deleted the feat/moderation-dashboard branch May 8, 2023 13:31
@sampaiodiego sampaiodiego mentioned this pull request May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants