Profile: Fix public channels displaying a private link (#1304)
This commit is contained in:
parent
bf6c6ef035
commit
89fc01c58e
@ -112,7 +112,7 @@ const ChatExtra: FC<OwnProps & StateProps & DispatchProps> = ({
|
|||||||
<span className="subtitle">{lang(userId ? 'UserBio' : 'Info')}</span>
|
<span className="subtitle">{lang(userId ? 'UserBio' : 'Info')}</span>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
)}
|
)}
|
||||||
{(canInviteUsers || !username) && !!link.length && (
|
{(canInviteUsers || !username) && link && (
|
||||||
<ListItem icon="mention" multiline narrow ripple onClick={() => copy(link, lang('SetUrlPlaceholder'))}>
|
<ListItem icon="mention" multiline narrow ripple onClick={() => copy(link, lang('SetUrlPlaceholder'))}>
|
||||||
<div className="title">{link}</div>
|
<div className="title">{link}</div>
|
||||||
<span className="subtitle">{lang('SetUrlPlaceholder')}</span>
|
<span className="subtitle">{lang('SetUrlPlaceholder')}</span>
|
||||||
|
|||||||
@ -82,13 +82,13 @@ export function getChatDescription(chat: ApiChat) {
|
|||||||
|
|
||||||
export function getChatLink(chat: ApiChat) {
|
export function getChatLink(chat: ApiChat) {
|
||||||
const { username } = chat;
|
const { username } = chat;
|
||||||
const { inviteLink } = chat.fullInfo || {};
|
if (username) {
|
||||||
|
return `https://t.me/${username}`;
|
||||||
if (inviteLink && inviteLink.length) {
|
|
||||||
return inviteLink;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return username ? `https://t.me/${username}` : '';
|
const { inviteLink } = chat.fullInfo || {};
|
||||||
|
|
||||||
|
return inviteLink;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getChatAvatarHash(
|
export function getChatAvatarHash(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user