浏览代码

Handle onion only registrations

Bob Mottram 8 年前
父节点
当前提交
2632e5bad5
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      src/freedombone-app-matrix

+ 5
- 1
src/freedombone-app-matrix 查看文件

290
 
290
 
291
     ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password"
291
     ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password"
292
 
292
 
293
-    retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a)
293
+    if [[ $ONION_ONLY == 'no' ]]; then
294
+        retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a https://${DEFAULT_DOMAIN_NAME}:${MATRIX_HTTP_PORT})
295
+    else
296
+        retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a http://${DEFAULT_DOMAIN_NAME}:${MATRIX_HTTP_PORT})
297
+    fi
294
     echo "0"
298
     echo "0"
295
 }
299
 }
296
 
300