Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion components/Feed/items/FeedItemComment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Tooltip } from '@/components/ui/Tooltip';
import { TipContentModal } from '@/components/modals/TipContentModal';
import { Badge } from '@/components/ui/Badge';
import { useUser } from '@/contexts/UserContext';
import { isFoundationUser } from '@/components/Bounty/lib/bountyUtil';

// Define the recursive rendering component for parent comments
const RenderParentComment: FC<{ comment: ParentCommentPreview; level: number }> = ({
Expand Down Expand Up @@ -115,6 +116,7 @@ export const FeedItemComment: FC<FeedItemCommentProps> = ({

// Check if current user is the comment author to prevent self-tipping
const isCurrentUserAuthor = user?.authorProfile?.id === author?.id;
const canTip = isFoundationUser(user?.id) && !isCurrentUserAuthor;
const aiReviewUserId = process.env.NEXT_PUBLIC_AI_REVIEW_USER_ID;
const isAiReviewer =
aiReviewUserId != null && String(author?.user?.id ?? '') === String(aiReviewUserId);
Expand Down Expand Up @@ -265,7 +267,7 @@ export const FeedItemComment: FC<FeedItemCommentProps> = ({
userVote={entry.userVote}
actionLabels={actionLabels}
onComment={onReply}
onTip={!isCurrentUserAuthor ? () => setIsTipModalOpen(true) : undefined}
onTip={canTip ? () => setIsTipModalOpen(true) : undefined}
showTooltips={showTooltips}
menuItems={menuItems}
awardedBountyAmount={entry.awardedBountyAmount}
Expand Down