From bb429d3f7eec4b7f4053e93885e258fcbf7cc4ca Mon Sep 17 00:00:00 2001 From: Matteo Manzinello Date: Fri, 19 Jul 2019 11:57:34 +0200 Subject: [PATCH] draft openTelegram --- src/mailgo.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/mailgo.js b/src/mailgo.js index 7927f84..552b43e 100644 --- a/src/mailgo.js +++ b/src/mailgo.js @@ -487,16 +487,13 @@ const actions = { mailToEncoded(encEmail); }, - openWhatsApp: tel => { + openWhatsApp: (tel, msg = "") => { let waUrl = "https://wa.me/" + tel; - window.open(waUrl, "_blank"); }, - openTelegram: tel => { - // TODO - let tgUrl = ""; - + openTelegram: (tel, msg = "") => { + let tgUrl = "tg://msg?text=" + msg + "&to=" + tel; window.open(tgUrl, "_blank"); },