Skip to content

Commit

Permalink
fix: issues when replying to comments (#10912)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickoferrall authored Feb 25, 2025
1 parent 8937420 commit e4f293a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/client/components/DiscussionThreadInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,9 @@ const DiscussionThreadInput = (props: Props) => {
?.setValue(null, 'replyingTo')
})
})
const {viewerId} = atmosphere
const [initialContent] = useState(() => {
return replyingTo?.createdByUser && !!replyingTo?.threadParentId
return replyingTo?.createdByUser && replyingTo.createdByUser.id !== viewerId
? JSON.stringify(makeReplyTo(replyingTo.createdByUser))
: convertTipTapTaskContent('')
})
Expand Down
3 changes: 1 addition & 2 deletions packages/client/hooks/useTipTapCommentEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ export const useTipTapCommentEditor = (
}
})
].filter(isValid),
editable: !readOnly,
autofocus: true
editable: !readOnly
},
[readOnly]
)
Expand Down

0 comments on commit e4f293a

Please sign in to comment.