Skip to content

Commit

Permalink
Send a message to group
Browse files Browse the repository at this point in the history
fix #16
  • Loading branch information
allburov committed Sep 26, 2022
1 parent 0b4e8e3 commit ac865ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/whatsapp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ const SUFFIX_DIRECT_MESSAGE = "@c.us"
* @param phone
*/
export function ensureSuffix(phone) {
if (phone.endsWith(SUFFIX_DIRECT_MESSAGE)) {
if (phone.includes("@")) {
return phone
}
return phone + SUFFIX_DIRECT_MESSAGE
Expand Down

0 comments on commit ac865ab

Please sign in to comment.