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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

[AND-15] Moderation V2 #5493

wants to merge 2 commits into from

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
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.

1 participant