best check on telegramUsername exists
This commit is contained in:
parent
d57a3f17bc
commit
1a57a77edb
@ -453,17 +453,16 @@ const mailgoRender = (type = MAIL_TYPE, mailgo) => {
|
|||||||
callButton = getE("mailgo-call");
|
callButton = getE("mailgo-call");
|
||||||
copyButton = getE("mailgo-tel-copy");
|
copyButton = getE("mailgo-tel-copy");
|
||||||
|
|
||||||
if (telegramUsername) {
|
|
||||||
setDisplay("mailgo-telegram", "block");
|
|
||||||
}
|
|
||||||
|
|
||||||
// the title of the modal (tel)
|
// the title of the modal (tel)
|
||||||
titleEl.innerHTML = tel;
|
titleEl.innerHTML = tel;
|
||||||
|
|
||||||
// add the actions to buttons
|
// add the actions to buttons
|
||||||
waButton.addEventListener("click", () => actions.openWhatsApp());
|
waButton.addEventListener("click", () => actions.openWhatsApp());
|
||||||
|
|
||||||
|
if (telegramUsername) {
|
||||||
|
setDisplay("mailgo-telegram", "block");
|
||||||
telegramButton.addEventListener("click", () => actions.openTelegram());
|
telegramButton.addEventListener("click", () => actions.openTelegram());
|
||||||
|
}
|
||||||
|
|
||||||
callButton.addEventListener("click", () => actions.callDefault());
|
callButton.addEventListener("click", () => actions.callDefault());
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user