mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-22 05:11:55 +01:00
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>
|
||||
</ListItem>
|
||||
)}
|
||||
{(canInviteUsers || !username) && !!link.length && (
|
||||
{(canInviteUsers || !username) && link && (
|
||||
<ListItem icon="mention" multiline narrow ripple onClick={() => copy(link, lang('SetUrlPlaceholder'))}>
|
||||
<div className="title">{link}</div>
|
||||
<span className="subtitle">{lang('SetUrlPlaceholder')}</span>
|
||||
|
@ -82,13 +82,13 @@ export function getChatDescription(chat: ApiChat) {
|
||||
|
||||
export function getChatLink(chat: ApiChat) {
|
||||
const { username } = chat;
|
||||
const { inviteLink } = chat.fullInfo || {};
|
||||
|
||||
if (inviteLink && inviteLink.length) {
|
||||
return inviteLink;
|
||||
if (username) {
|
||||
return `https://t.me/${username}`;
|
||||
}
|
||||
|
||||
return username ? `https://t.me/${username}` : '';
|
||||
const { inviteLink } = chat.fullInfo || {};
|
||||
|
||||
return inviteLink;
|
||||
}
|
||||
|
||||
export function getChatAvatarHash(
|
||||
|
Loading…
x
Reference in New Issue
Block a user