From 8bdb2c47e68f591a22c70fed03beccfb42545184 Mon Sep 17 00:00:00 2001 From: Rohit Ninawe Date: Tue, 4 Jun 2024 15:53:56 +0530 Subject: [PATCH] v4.2.1 --- package.json | 2 +- .../CometChatStickerKeyboard/CometChatStickerKeyboard.tsx | 7 ++++++- src/extensions/Stickers/StickersExtensionDecorator.tsx | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a1afae0..1d84141 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cometchat/chat-uikit-react-native", - "version": "4.2.0", + "version": "4.2.1", "description": "CometChat React Native UI Kit is a collection of custom UI Components designed to build text , chat and calling features in your application. The UI Kit is developed to keep developers in mind and aims to reduce development efforts significantly", "main": "src/index", "module": "src/index", diff --git a/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx b/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx index d4d7b02..98f6560 100644 --- a/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +++ b/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx @@ -37,7 +37,12 @@ export const CometChatStickerKeyboard = (props: CometChatStickerKeyboardInterfac const theme = new CometChatTheme(props?.theme || {}); const sendStickerMessage = (stickerItem) => { - props?.onPress(stickerItem); + if(stickerItem && typeof stickerItem === 'object') + props?.onPress({ + ...stickerItem, + sticker_url: stickerItem?.stickerUrl, + sticker_name: stickerItem?.stickerSetName + }); }; const onStickerSetClicked = (sectionItem) => { diff --git a/src/extensions/Stickers/StickersExtensionDecorator.tsx b/src/extensions/Stickers/StickersExtensionDecorator.tsx index 057509a..26d1b9a 100644 --- a/src/extensions/Stickers/StickersExtensionDecorator.tsx +++ b/src/extensions/Stickers/StickersExtensionDecorator.tsx @@ -49,7 +49,7 @@ export class StickersExtensionDecorator extends DataSourceDecorator { } getStickerBubble(message: CometChat.CustomMessage, alignment: MessageBubbleAlignmentType) { - let url = message?.['data']?.['customData']?.['stickerUrl']; + let url = message?.['data']?.['customData']?.['sticker_url']; return