Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AND-15] Moderation V2 #5493

Merged
merged 10 commits into from
Dec 12, 2024
Merged

[AND-15] Moderation V2 #5493

merged 10 commits into from
Dec 12, 2024

Conversation

VelikovPetar
Copy link
Contributor

🎯 Goal

Add handling for the new moderation property of the Message object - in addition to the current moderationDetails.

Linear: https://linear.app/stream/issue/AND-15/moderation-v2

🛠 Implementation details

  • Implement new DownstreamModerationDto and include it in the DownstreamMessageDto (+ corresponding domain models and DB entities)
  • Modify the Message.isModerationBounce() method to also check if message.moderation.action == ModerationAction.bounce
  • Modify the Message.isModerationFlag() method to also check if message.moderation.action == ModerationAction.flag (not used at the moment)
  • No need for special handling if action == remove, it is handled automatically via am error message

🎨 UI Changes

Before (bounce -> remove) => Bounce not properly handled when delivered in `moderation` After (bounce -> remove) => Bounce handled when delivered in `moderation`
bounce_before.mp4
bounce_after.mp4

Copy link
Contributor

DB Entities have been updated. Do we need to upgrade DB Version?
Modified Entities :

stream-chat-android-offline/src/main/java/io/getstream/chat/android/offline/repository/domain/message/internal/MessageEntity.kt

@VelikovPetar VelikovPetar marked this pull request as ready for review November 28, 2024 16:24
@VelikovPetar VelikovPetar requested a review from a team as a code owner November 28, 2024 16:24
Copy link
Collaborator

@testableapple testableapple left a comment

Choose a reason for hiding this comment

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

Currently discussing issues in slack.

@JcMinarro JcMinarro merged commit 6b900b8 into develop Dec 12, 2024
9 checks passed
@JcMinarro JcMinarro deleted the feature/moderation_v2 branch December 12, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants