fix: [REACT-218] adjust filterErrorMessages to only filter current user's messages#1510
fix: [REACT-218] adjust filterErrorMessages to only filter current user's messages#1510arnautov-anton wants to merge 1 commit into
Conversation
|
Size Change: +279 B (+0.05%) Total Size: 533 kB
|
khushal87
left a comment
There was a problem hiding this comment.
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.
@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.
|
Closing for now, I'll re-open once relevant again. |
Description of the changes, What, Why and How?
Ref: GetStream/stream-chat-react#2675