diff --git a/__tests__/__snapshots__/Storyshots.test.js.snap b/__tests__/__snapshots__/Storyshots.test.js.snap index 16d0b548..6d5507b9 100644 --- a/__tests__/__snapshots__/Storyshots.test.js.snap +++ b/__tests__/__snapshots__/Storyshots.test.js.snap @@ -4723,7 +4723,7 @@ exports[`Storyshots Message list message 1`] = ` ] } > - @rocket.cat + rocket.cat - @diego.mello + diego.mello - @all + all - @here + here - #general + general diff --git a/app/containers/markdown/AtMention.js b/app/containers/markdown/AtMention.js index 7f04c8b8..8980777e 100644 --- a/app/containers/markdown/AtMention.js +++ b/app/containers/markdown/AtMention.js @@ -28,21 +28,27 @@ const AtMention = React.memo(({ } const handlePress = () => { - if (mentions && mentions.length && mentions.findIndex(m => m.username === mention) !== -1) { - const index = mentions.findIndex(m => m.username === mention); - const navParam = { - t: 'd', - rid: mentions[index]._id - }; - navToRoomInfo(navParam); - } + const index = mentions.findIndex(m => m.username === mention); + const navParam = { + t: 'd', + rid: mentions[index]._id + }; + navToRoomInfo(navParam); }; + if (mentions && mentions.length && mentions.findIndex(m => m.username === mention) !== -1) { + return ( + + {mention} + + ); + } + return ( - + {`@${ mention }`} ); diff --git a/app/containers/markdown/Hashtag.js b/app/containers/markdown/Hashtag.js index c8704123..594192ca 100644 --- a/app/containers/markdown/Hashtag.js +++ b/app/containers/markdown/Hashtag.js @@ -24,12 +24,12 @@ const Hashtag = React.memo(({ style={[preview ? { ...styles.text, color: themes[theme].bodyText } : styles.mention, ...style]} onPress={preview ? undefined : handlePress} > - {`#${ hashtag }`} + {hashtag} ); } return ( - + {`#${ hashtag }`} );