@@ -133,6 +133,7 @@ type StateProps = {
133
133
areAdsEnabled ?: boolean ;
134
134
channelJoinInfo ?: ApiChatFullInfo [ 'joinInfo' ] ;
135
135
isChatProtected ?: boolean ;
136
+ hasCustomGreeting ?: boolean ;
136
137
} ;
137
138
138
139
const MESSAGE_REACTIONS_POLLING_INTERVAL = 20 * 1000 ;
@@ -195,6 +196,7 @@ const MessageList: FC<OwnProps & StateProps> = ({
195
196
onIntersectPinnedMessage,
196
197
onScrollDownToggle,
197
198
onNotchToggle,
199
+ hasCustomGreeting,
198
200
} ) => {
199
201
const {
200
202
loadViewportMessages, setScrollOffset, loadSponsoredMessages, loadMessageReactions, copyMessagesByIds,
@@ -696,7 +698,7 @@ const MessageList: FC<OwnProps & StateProps> = ({
696
698
{ restrictionReason ? restrictionReason . text : `This is a private ${ isChannelChat ? 'channel' : 'chat' } ` }
697
699
</ span >
698
700
</ div >
699
- ) : paidMessagesStars && isPrivate && ! hasMessages ? (
701
+ ) : paidMessagesStars && isPrivate && ! hasMessages && ! hasCustomGreeting ? (
700
702
< RequirementToContactMessage paidMessagesStars = { paidMessagesStars } userId = { chatId } />
701
703
) : isContactRequirePremium && ! hasMessages ? (
702
704
< RequirementToContactMessage userId = { chatId } />
@@ -795,6 +797,8 @@ export default memo(withGlobal<OwnProps>(
795
797
const isCurrentUserPremium = selectIsCurrentUserPremium ( global ) ;
796
798
const areAdsEnabled = ! isCurrentUserPremium || selectUserFullInfo ( global , currentUserId ) ?. areAdsEnabled ;
797
799
800
+ const hasCustomGreeting = Boolean ( userFullInfo ?. businessIntro ) ;
801
+
798
802
return {
799
803
areAdsEnabled,
800
804
isChatLoaded : true ,
@@ -828,6 +832,7 @@ export default memo(withGlobal<OwnProps>(
828
832
currentUserId,
829
833
isChatProtected : selectIsChatProtected ( global , chatId ) ,
830
834
...( withLastMessageWhenPreloading && { lastMessage } ) ,
835
+ hasCustomGreeting,
831
836
} ;
832
837
} ,
833
838
) ( MessageList ) ) ;
0 commit comments