-
Notifications
You must be signed in to change notification settings - Fork 76
fix: [REACT-218] adjust filterErrorMessages to only filter current user's messages #1510
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
base: master
Are you sure you want to change the base?
Conversation
Size Change: +279 B (+0.05%) Total Size: 533 kB
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the purpose of this change? It looks fine anyways.
(message) => | ||
!( | ||
message.type === 'error' && | ||
(message.user?.id === userId || message.user_id === userId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arnautov-anton can we add this as a param like onlyOwnMessages
or similar? To avoid changing the method's behavior. Btw this is a bit of a weird behavior because this means that async moderated messages will be filtered for the sender, but not for receivers. But I understand the reason for this.
@arnautov-anton how does all this work for thread messages? |
My apologies, @khushal87, forgot to reference the relevant PR at first - it's connected to the
I'm not sure it does, @szuperaz. Either way I'm really not happy with this fix (or the existing behavior), I've drafted this up based on our conversation but while I was testing it out it feels clunky at best - I'd rather we go with Angular's behavior where the error messages are kept for the duration of the application runtime. I'll release the |
### 🎯 Goal This PR adds a `MessageBlocked` component to render instead of a normal message UI whenever sync/async moderation blocks an inappropriate message. Ref: GetStream/stream-chat-js#1510 Ref: GetStream/stream-chat-css#327 Also awaits BE changes to the `message.updated` message object's payload.
This PR adds a `MessageBlocked` component to render instead of a normal message UI whenever sync/async moderation blocks an inappropriate message. Ref: GetStream/stream-chat-js#1510 Ref: GetStream/stream-chat-css#327 Also awaits BE changes to the `message.updated` message object's payload.
Description of the changes, What, Why and How?
Ref: GetStream/stream-chat-react#2675