You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a renderMenuItem to the MessageMenu component
How to use?
<GroupChannelrenderMessageContent={(props)=>(<MessageContent{...props}renderMessageMenu={(props)=>(<MessageMenu{...props}renderMenuItem={(props)=>{const{
className,
onClick,
dataSbId,
disable,
text,}=props;return<MenuItem/>// Render Custom Menu Item}}/>)}/>)}/>
Added onBeforeDownloadFileMessage to the <GroupChannel /> and <Thread /> modules
How to use?
constONE_MB=1024*1024;/** * Use this list to check if it's displayed as a ThumbnailMessage. * (https://github.com/sendbird/sendbird-uikit-react/blob/main/src/utils/index.ts)*/constThumbnailMessageTypes=['image/jpeg','image/jpg','image/png','image/gif','image/svg+xml','image/webp',// not supported in IE'video/mpeg','video/ogg','video/webm','video/mp4',];<GroupChannel// or ThreadonBeforeDownloadFileMessage={async({ message, index =null})=>{if(message.isFileMessage()){constconfirmed=window.confirm(`The file size is ${(message.size/ONE_MB).toFixed(2)}MB. Would you like to continue downloading?`);returnconfirmed;}if(message.isMultipleFilesMessage()){constconfirmed=window.confirm(`The file size is ${(message.fileInfoList[index].fileSize/ONE_MB).toFixed(2)}MB. Would you like to continue downloading?`);returnconfirmed;}returntrue;}}/>
Added onDownloadClick to the FileViewer, FileViewerView, MobileBottomSheet, MobileContextMenu, and MobileMenu
Fixes
Improved the stability of the ChannelSettings Modals
Support menu on the MembersModal, MutedMembersModal, and OperatorsModal
Display Operator description on the MembersModal
Fixed the width size of the OGMessageItemBody component
Added fallback logic on template rendering error
Replaced the hardcoded text (You) with the StringSet CHANNEL_SETTING__MEMBERS__YOU in the UserListItem