Compare commits

...

2 Commits

Author SHA1 Message Date
0e1fbfeb1b
release: v0.2.5 2022-01-18 15:57:00 +03:00
4530c7105d
fix: tg contact behaviour
* sometimes  atg update does not include a plus symbol
2022-01-18 15:51:11 +03:00
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "ussd-tg-proxy",
"version": "0.2.4",
"version": "0.2.5",
"description": "ussd-tg-proxy",
"main": "src/index.js",
"repository": "https://git.grassecon.net/grassrootseconomics/ussd-tg-proxy.git",

View File

@ -78,7 +78,10 @@ bot.on("msg:contact", async (ctx) => {
const contact = ctx.msg.contact;
if (ctx.from.id === contact.user_id) {
if (contact.phone_number.slice(0, 4) !== "+254") {
if (
contact.phone_number.slice(0, 4) !== "+254" ||
contact.phone_number.slice(0, 3) !== "254"
) {
return ctx.reply("Sarafu is only available in Kenya at the moment.");
}