Sunday, March 16, 2025
1 change · 17.0
Resolved issues and error corrections
Fixed an issue in Discuss where starting a reply in one conversation, switching to another, and sending a message could post it in the original conversation. Reply mode is now cancelled when changing conversations, helping users avoid sending messages to the wrong place.
Original PR description
Before this commit, when starting a reply-to in composer, changing thread and posting a new message resulted in posting the message in the original thread instead. Steps to reproduce: - open a…
Before this commit, when starting a reply-to in composer, changing thread and posting a new message resulted in posting the message in the original thread instead. Steps to reproduce: - open a conversation A in Discuss app - click on "reply" on a message - open another conversation B in Discuss app - compose a message then send it => the message is posted in conversation A rather than B This happens because when changing conversation, the reply-to mode of the composer is kept. This is the case because `messageToReplyTo` is a stateful component hook of the thread viewer such as the Discuss app. This is put there because it's shared to both the `Thread` and `Composer` components, respectively to show the message being replied (reduced opacity to all other messages) and for composer to contains the reply-to message. The cancelling of the reply-to mode was only occurring when the user manually cancel it. Changing conversation was not considered as cancelling. This commit fixes this issue. Task-4593206