Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
b5a7f46e
Commit
b5a7f46e
authored
May 07, 2022
by
Sandeep Mittal
Committed by
neil
May 10, 2022
Browse files
Update callmebotWhatsApp.sh
variable updated to caps
parent
4381657c
Changes
1
Hide whitespace changes
Inline
Side-by-side
notify/callmebotWhatsApp.sh
View file @
b5a7f46e
...
...
@@ -2,8 +2,8 @@
#Support CallMeBot Whatsapp webhooks
#C
allMeBot_Phone
_N
o
=""
#C
allMeBot_apikey
=""
#C
ALLMEBOT_YOUR_PHONE
_N
O
=""
#C
ALLMEBOT_API_KEY
=""
callmebotWhatsApp_send
()
{
_subject
=
"
$1
"
...
...
@@ -11,23 +11,23 @@ callmebotWhatsApp_send() {
_statusCode
=
"
$3
"
#0: success, 1: error 2($RENEW_SKIP): skipped
_debug
"_statusCode"
"
$_statusCode
"
C
allMeBot_Phone
_N
o
=
"
${
C
allMeBot_Phone
_N
o
:-
$(
_readaccountconf_mutable C
allMeBot_Phone
_N
o
)
}
"
if
[
-z
"
$C
allMeBot_Phone
_N
o
"
]
;
then
C
allMeBot_Phone
_N
o
=
""
_err
"You didn't specify a Slack webhook url C
allMeBot_Phone
_N
o
yet."
C
ALLMEBOT_YOUR_PHONE
_N
O
=
"
${
C
ALLMEBOT_YOUR_PHONE
_N
O
:-
$(
_readaccountconf_mutable C
ALLMEBOT_YOUR_PHONE
_N
O
)
}
"
if
[
-z
"
$C
ALLMEBOT_YOUR_PHONE
_N
O
"
]
;
then
C
ALLMEBOT_YOUR_PHONE
_N
O
=
""
_err
"You didn't specify a Slack webhook url C
ALLMEBOT_YOUR_PHONE
_N
O
yet."
return
1
fi
_saveaccountconf_mutable C
allMeBot_Phone
_N
o
"
$C
allMeBot_Phone
_N
o
"
_saveaccountconf_mutable C
ALLMEBOT_YOUR_PHONE
_N
O
"
$C
ALLMEBOT_YOUR_PHONE
_N
O
"
C
allMeBot_apikey
=
"
${
CallMeBot_apikey
:-
$(
_readaccountconf_mutable C
allMeBot_apikey
)
}
"
if
[
-n
"
$C
allMeBot_apikey
"
]
;
then
_saveaccountconf_mutable C
allMeBot_apikey
"
$CallMeBot_apikey
"
C
ALLMEBOT_API_KEY
=
"
${
CALLMEBOT_API_KEY
:-
$(
_readaccountconf_mutable C
ALLMEBOT_API_KEY
)
}
"
if
[
-n
"
$C
ALLMEBOT_API_KEY
"
]
;
then
_saveaccountconf_mutable C
ALLMEBOT_API_KEY
"
$CALLMEBOT_API_KEY
"
fi
_waUrl
=
"https://api.callmebot.com/whatsapp.php"
_Phone_No
=
"
$(
printf
"%s"
"
$C
allMeBot_Phone
_N
o
"
| _url_encode
)
"
_apikey
=
"
$(
printf
"%s"
"
$C
allMeBot_apikey
"
| _url_encode
)
"
_Phone_No
=
"
$(
printf
"%s"
"
$C
ALLMEBOT_YOUR_PHONE
_N
O
"
| _url_encode
)
"
_apikey
=
"
$(
printf
"%s"
"
$C
ALLMEBOT_API_KEY
"
| _url_encode
)
"
_message
=
"
$(
printf
"
$CQHTTP_CUSTOM_MSGHEAD
*%s*
\\
n%s"
"
$_subject
"
"
$_content
"
| _url_encode
)
"
_finalUrl
=
"
$_waUrl
?phone=
$_Phone_No
&apikey=
$_apikey
&text=
$_message
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment