-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: prevent double update on message edit #1103
Conversation
const existingMessage = yield select(messageSelector(message.id)); | ||
if (existingMessage && existingMessage.message === message.message) { | ||
return; | ||
} |
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.
I'm not sure this is the right solution. A message could be updated for any number of reasons that aren't the message changing.
We should be able to update this message in state and if nothing has changed then it should just work. If that's not working then we're updating too much of the state or we're not providing enough of it in the event.
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.
Hm yeah looks like that shouldn't be needed.
The reason for the edited message rendering as a 'received' message is due to the userId
and senderId
differing slightly, therefore the isOwner
boolean is false when determining if sent/edited message is from the current user. Maybe we could have a v.quick call to discuss?
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.
i guess this is related to NOT mapping the user correctly maybe, while receiving the edit message event perhaps? (i.e userId/senderId don't match because one of them is zOS user id, and the other one is matrixId). Could you please check/confirm?
Closing this pul request in favour of : #1135 |
What does this do?
Why are we making this change?
How do I test this?
Key decisions and Risk Assessment:
Things to consider:
Before:
Screen.Recording.2023-10-17.at.11.28.49.mov
After:
Screen.Recording.2023-10-17.at.11.36.07.mov