Skip to content

Commit

Permalink
refactor: Update phone number parsing in pcode.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Neeraj-x0 committed May 26, 2024
1 parent 36f5721 commit b2581ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const connect = async () => {
}

const Xasena = async () => {
try {
try {
const { state, saveCreds } = await useMultiFileAuthState(
path.join(__basedir, "session")
);
Expand Down
2 changes: 1 addition & 1 deletion pcode.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const startSock = async () => {
if (!sock.authState.creds.me?.id && !restarted) {
let phoneNumber = await question("Enter phone number: ");
try {
phoneNumber = phonenumber.parsePhoneNumber(phoneNumber);
phoneNumber = phonenumber.parsePhoneNumber(phoneNumber).replace("+", "");
} catch (error) {
console.log("Invalid phone number");
process.exit(1);
Expand Down

0 comments on commit b2581ac

Please sign in to comment.