Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
uriva committed Sep 5, 2024
1 parent 5964bba commit d638847
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/greenApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ type GreenApiMessage = {
};
};

const rewriteNumber = replace("@c.us", "");
const phoneSuffix = "@c.us";

const rewriteNumber = replace(phoneSuffix, "");

const messageSender = ({
senderData: { sender },
Expand Down Expand Up @@ -134,7 +136,7 @@ export const greenApiHandler = (
convertToWhatsAppFormat,
(txt: string) =>
greenApi.restAPI(credentials).message.sendMessage(
messageSender(msg),
messageSender(msg) + phoneSuffix,
null,
txt,
),
Expand Down

0 comments on commit d638847

Please sign in to comment.