diff --git a/app/containers/markdown/new/BigEmoji.tsx b/app/containers/markdown/new/BigEmoji.tsx
index f8032ff8..55205053 100644
--- a/app/containers/markdown/new/BigEmoji.tsx
+++ b/app/containers/markdown/new/BigEmoji.tsx
@@ -17,7 +17,7 @@ const styles = StyleSheet.create({
const BigEmoji = ({ value }: IBigEmojiProps) => (
{value.map(block => (
-
+
))}
);
diff --git a/app/containers/markdown/new/Emoji.tsx b/app/containers/markdown/new/Emoji.tsx
index a7d1810a..8ed5ef8c 100644
--- a/app/containers/markdown/new/Emoji.tsx
+++ b/app/containers/markdown/new/Emoji.tsx
@@ -10,20 +10,29 @@ import CustomEmoji from '../../EmojiPicker/CustomEmoji';
import MarkdownContext from './MarkdownContext';
interface IEmojiProps {
- value: EmojiProps['value'];
+ block: EmojiProps;
isBigEmoji?: boolean;
}
-const Emoji = ({ value, isBigEmoji }: IEmojiProps) => {
+const Emoji = ({ block, isBigEmoji }: IEmojiProps) => {
const { theme } = useTheme();
const { baseUrl, getCustomEmoji } = useContext(MarkdownContext);
- const emojiUnicode = shortnameToUnicode(`:${value.value}:`);
- const emoji = getCustomEmoji?.(value.value);
+
+ if ('unicode' in block) {
+ return {block.unicode};
+ }
+ const emojiToken = block?.shortCode ? `:${block.shortCode}:` : `:${block.value?.value}:`;
+ const emojiUnicode = shortnameToUnicode(emojiToken);
+ const emoji = getCustomEmoji?.(block.value?.value);
if (emoji) {
return ;
}
- return {emojiUnicode};
+ return (
+
+ {emojiUnicode}
+
+ );
};
export default Emoji;
diff --git a/app/containers/markdown/new/Inline.tsx b/app/containers/markdown/new/Inline.tsx
index 70dca084..c9ad9211 100644
--- a/app/containers/markdown/new/Inline.tsx
+++ b/app/containers/markdown/new/Inline.tsx
@@ -48,7 +48,7 @@ const Inline = ({ value }: IParagraphProps) => {
/>
);
case 'EMOJI':
- return ;
+ return ;
case 'MENTION_CHANNEL':
return ;
case 'INLINE_CODE':
diff --git a/package.json b/package.json
index ecbec904..ef766f4b 100644
--- a/package.json
+++ b/package.json
@@ -51,7 +51,7 @@
"@react-navigation/elements": "^1.3.3",
"@react-navigation/native": "6.0.10",
"@react-navigation/stack": "6.2.1",
- "@rocket.chat/message-parser": "0.30.0",
+ "@rocket.chat/message-parser": "^0.31.14",
"@rocket.chat/sdk": "RocketChat/Rocket.Chat.js.SDK#mobile",
"@rocket.chat/ui-kit": "^0.31.13",
"bytebuffer": "^5.0.1",
diff --git a/yarn.lock b/yarn.lock
index 7bd9a2c8..484f38cd 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4140,10 +4140,10 @@
dependencies:
eslint-plugin-import "^2.17.2"
-"@rocket.chat/message-parser@0.30.0":
- version "0.30.0"
- resolved "https://registry.yarnpkg.com/@rocket.chat/message-parser/-/message-parser-0.30.0.tgz#63a25aa7fa17724d55db80f95f7f8d6a99ae42ff"
- integrity sha512-pI7ajaojv+GqhQBMnFiBOWerE7zIlJywWFaLzJlIC/wsJ9LgX6YaKY2wqc909nkr+E4qZY1luJ61ErXGGSF9Zw==
+"@rocket.chat/message-parser@^0.31.14":
+ version "0.31.14"
+ resolved "https://registry.yarnpkg.com/@rocket.chat/message-parser/-/message-parser-0.31.14.tgz#55042be10a7cd49a7a9a969272bc38897fe1c252"
+ integrity sha512-WgaWLMCFWcmhRb7cEm1Q8GoD8lgpPuTniG27Qmfw8k86MuZfdHj+cdOfhvkmdNORxx181RhfksTO0k6IkRxh6A==
"@rocket.chat/sdk@RocketChat/Rocket.Chat.js.SDK#mobile":
version "1.3.0-mobile"