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

fix: issues when replying to comments #10912

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

Conversation

nickoferrall
Copy link
Contributor

Fix #10223

Demo: https://www.loom.com/share/971e6d96cdd947eb9629fdc7c9672914

This fixes three issues:

  1. When replying to yourself, initially, it doesn't prefix the reply with the user's name. Only when replying to a reply does it do this.
  2. When replying to yourself, it shouldn't add your name as the prefix.
  3. When Bob replies to Susan, prefix Bob's comment with @Susan and ensure the cursor starts after @Susan. Currently, it's before.

const [initialContent] = useState(() => {
return replyingTo?.createdByUser && !!replyingTo?.threadParentId
return replyingTo?.createdByUser && replyingTo.createdByUser.id !== viewerId
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 I don't quite get the new logic. Now if Bob wrote a top level message and I reply to it, I @mention Bob, even on if it's the first level reply.
I think it's always silly to @mention myself, but I think if I reply to the thread opener, there is no need to add the @mention either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discussions: when replying to self, do not start with @self
2 participants