this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Better copy for interactions on replies

+21 -4
+21 -4
src/components/notification.jsx
··· 39 39 mention: 'mentioned you in their post.', 40 40 status: 'published a post.', 41 41 reblog: 'boosted your post.', 42 + reblog_reply: 'boosted your reply.', 42 43 follow: 'followed you.', 43 44 follow_request: 'requested to follow you.', 44 45 favourite: 'favourited your post.', 46 + favourite_reply: 'favourited your reply.', 45 47 poll: 'A poll you have voted in or created has ended.', 46 48 'poll-self': 'A poll you have created has ended.', 47 49 'poll-voted': 'A poll you have voted in has ended.', 48 50 update: 'A post you interacted with has been edited.', 49 51 'favourite+reblog': 'boosted & favourited your post.', 52 + 'favourite+reblog_reply': 'boosted & favourited your reply.', 50 53 }; 51 54 52 55 function Notification({ notification, instance, reload }) { ··· 59 62 const currentAccount = store.session.get('currentAccount'); 60 63 const isSelf = currentAccount === account?.id; 61 64 const isVoted = status?.poll?.voted; 65 + const isReplyToOthers = 66 + !!status?.inReplyToAccountId && 67 + status?.inReplyToAccountId !== currentAccount && 68 + status?.account?.id === currentAccount; 62 69 63 70 let favsCount = 0; 64 71 let reblogsCount = 0; ··· 75 82 if (!favsCount && reblogsCount) type = 'reblog'; 76 83 } 77 84 78 - const text = 79 - type === 'poll' 80 - ? contentText[isSelf ? 'poll-self' : isVoted ? 'poll-voted' : 'poll'] 81 - : contentText[type]; 85 + let text; 86 + if (type === 'poll') { 87 + text = contentText[isSelf ? 'poll-self' : isVoted ? 'poll-voted' : 'poll']; 88 + } else if ( 89 + type === 'reblog' || 90 + type === 'favourite' || 91 + type === 'favourite+reblog' 92 + ) { 93 + text = 94 + contentText[isReplyToOthers ? `${type}_reply` : type] || 95 + contentText[type]; 96 + } else { 97 + text = contentText[type]; 98 + } 82 99 83 100 if (type === 'mention' && !status) { 84 101 // Could be deleted