File tree Expand file tree Collapse file tree 5 files changed +10
-7
lines changed
smart-components/Channel/context Expand file tree Collapse file tree 5 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ declare module "SendbirdUIKitGlobal" {
214214 renderUserProfile?: (props: RenderUserProfileProps) => React.ReactNode | React.ReactElement;
215215 allowProfileEdit: boolean;
216216 isOnline: boolean;
217+ isReactionEnabled: boolean;
217218 isMentionEnabled: boolean;
218219 userMention: {
219220 maxMentionCount: number;
@@ -452,10 +453,10 @@ declare module "SendbirdUIKitGlobal" {
452453 };
453454
454455 export type ChannelContextProps = {
455- channelUrl: string;
456456 children?: React.ReactElement;
457- useMessageGrouping?: boolean;
458- useReaction?: boolean;
457+ channelUrl: string;
458+ isReactionEnabled?: boolean;
459+ isMessageGroupingEnabled?: boolean;
459460 showSearchIcon?: boolean;
460461 highlightedMessage?: number;
461462 startingPoint?: number;
@@ -468,7 +469,6 @@ declare module "SendbirdUIKitGlobal" {
468469 queries?: ChannelQueries;
469470 renderUserProfile?: (props: RenderUserProfileProps) => React.ReactNode | React.ReactElement;
470471 disableUserProfile?: boolean;
471- renderUserMentionItem?: (props: { user: User }) => JSX.Element;
472472 };
473473
474474 export interface ChannelUIProps {
Original file line number Diff line number Diff line change @@ -117,6 +117,7 @@ interface SendBirdStateConfig {
117117 renderUserProfile ?: ( props : RenderUserProfileProps ) => React . ReactElement ;
118118 allowProfileEdit : boolean ;
119119 isOnline : boolean ;
120+ isReactionEnabled : boolean ;
120121 isMentionEnabled : boolean ;
121122 userMention : {
122123 maxMentionCount : number ;
@@ -596,8 +597,8 @@ type ChannelQueries = {
596597} ;
597598
598599type ChannelContextProps = {
599- channelUrl : string ;
600600 children ?: React . ReactElement ;
601+ channelUrl : string ;
601602 isReactionEnabled ?: boolean ;
602603 isMessageGroupingEnabled ?: boolean ;
603604 showSearchIcon ?: boolean ;
Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ interface SendBirdStateConfig {
4141 theme : SendbirdUIKitThemes ;
4242 setCurrenttheme : ( theme : SendbirdUIKitThemes ) => void ;
4343 userListQuery ?( ) : UserListQuery ;
44- isMentionEnabled ?: boolean ;
44+ isReactionEnabled : boolean ;
45+ isMentionEnabled : boolean ;
4546 userMention : {
4647 maxMentionCount : number ,
4748 maxSuggestionCount : number ,
Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ export interface SendBirdStateConfig {
6262 logger : Logger ;
6363 setCurrenttheme : ( theme : string ) => void ;
6464 userListQuery ?( ) : SendBirdTypes . UserListQuery ;
65+ isReactionEnabled : boolean ;
6566 isMentionEnabled : boolean ;
6667 userMention : {
6768 maxMentionCount : number ,
Original file line number Diff line number Diff line change @@ -209,7 +209,7 @@ const ChannelProvider: React.FC<ChannelContextProps> = (props: ChannelContextPro
209209 const isBroadcast = currentGroupChannel ?. isBroadcast || false ;
210210 const { appInfo } = sdk ;
211211 const usingReaction = (
212- appInfo ?. useReaction && ! isBroadcast && ! isSuper && isReactionEnabled
212+ appInfo ?. useReaction && ! isBroadcast && ! isSuper && ( config ?. isReactionEnabled || isReactionEnabled )
213213 // TODO: Make isReactionEnabled independent from appInfo.useReaction
214214 ) ;
215215
You can’t perform that action at this time.
0 commit comments