Profile: Show either link or username (#1278)

This commit is contained in:
Alexander Zinchuk 2021-07-15 21:50:16 +03:00
parent 0c4ef63d71
commit 1997aa1d5a

View File

@ -139,7 +139,7 @@ export default memo(withGlobal<OwnProps>(
const user = isChatPrivate(chatOrUserId) ? selectUser(global, chatOrUserId) : undefined;
const isMuted = chat && selectIsChatMuted(chat, selectNotifySettings(global), selectNotifyExceptions(global));
const canInviteUsers = chat && (
const canInviteUsers = chat && !user && (
(!isChatChannel(chat) && !isUserRightBanned(chat, 'inviteUsers'))
|| getHasAdminRight(chat, 'inviteUsers')
);