Skip to content
Extraits de code Groupes Projets
Valider ffa9a097 rédigé par Miryuni's avatar Miryuni
Parcourir les fichiers

Merge branch 'Script_Error_Fix' into 'master'

Message d'erreur plus explicite

See merge request Tigriz/matrix-stickers!10
parents f246322f 71fa0aa8
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -53,13 +53,13 @@ curl "https://$homeserver" -I -o headers -s
if test -f "headers"; then
rm headers
else
echo 1>&2 "$0:FATAL: The homeserver \"$2\" is not correct."
echo 1>&2 "$0:FATAL: The homeserver \"$2\" is incorrect."
exit 1
fi
# Checking if the token exist.
# Save the error value on file "headers" and
# compare the error to verify the token
# evaluate it to verify the token
curl -s -X POST "https://$homeserver/_matrix/media/r0/upload?access_token=$token" | python3 -c "import sys, json; print(json.load(sys.stdin)['errcode'])" >> headers
while read line; do
if [[ ($line == "M_UNKNOWN") ]]
......@@ -67,7 +67,7 @@ while read line; do
rm headers
else if [[ ($line == "M_UNKNOWN_TOKEN") ]]
then
echo "$0:ERROR: The token provided does not exist"
echo "$0:ERROR: The token provided is incorrect or does not exist in this homeserver"
rm headers
exit 1
else
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter