From 9737d2cc45885b2f1c7d810f99dd0758b95af8ac Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Fri, 25 May 2018 20:06:38 +0100
Subject: [PATCH] Prepend https to domains

---
 src/freedombone-utils-android | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/freedombone-utils-android b/src/freedombone-utils-android
index e72d9c5a..d97a424c 100755
--- a/src/freedombone-utils-android
+++ b/src/freedombone-utils-android
@@ -88,6 +88,13 @@ function android_update_apps {
                 read_config_param "${app_name_upper}_DOMAIN_NAME"
                 test_domain_name="${app_name_upper}_DOMAIN_NAME"
                 domain_name=${!test_domain_name}
+                if [ "$domain_name" ]; then
+                    if [[ "$domain_name" != *'.onion' ]]; then
+                        domain_name="https://${!test_domain_name}"
+                    else
+                        domain_name="http://${!test_domain_name}"
+                    fi
+                fi
                 if [[ "$domain_name" && "$app_name" != 'matrix' ]]; then
                     { echo '        {';
                       echo "          \"name\": \"${app_name}\",";