diff --git a/src/httpapi/configapi/__init__.py b/src/httpapi/configapi/__init__.py index c5345e2b..e1226a3a 100755 --- a/src/httpapi/configapi/__init__.py +++ b/src/httpapi/configapi/__init__.py @@ -20,6 +20,8 @@ import json from flask import Blueprint, request, Response, abort import config, onionrutils + +from onionrutils.bytesconverter import bytes_to_str config.reload() config_BP = Blueprint('config_BP', __name__) @@ -55,7 +57,7 @@ def set_by_key(key): } """ try: - data = json.loads(onionrutils.OnionrUtils.bytesToStr(request.data))['data'] + data = json.loads(bytes_to_str(request.data)) except (json.JSONDecodeError, KeyError): abort(400) config.set(key, data, True) diff --git a/src/httpapi/insertblock.py b/src/httpapi/insertblock.py index 9866dbea..dbbe22ef 100644 --- a/src/httpapi/insertblock.py +++ b/src/httpapi/insertblock.py @@ -69,5 +69,8 @@ def client_api_insert_block(): meta = json.loads(bData['meta']) except KeyError: pass - threading.Thread(target=onionrblocks.insert, args=(message,), kwargs={'header': bType, 'encryptType': encryptType, 'sign':sign, 'asymPeer': to, 'meta': meta}).start() + threading.Thread( + target=onionrblocks.insert, args=(message,), + kwargs={'header': bType, 'encryptType': encryptType, + 'sign':sign, 'asymPeer': to, 'meta': meta, 'disableForward': bData['forward']}).start() return Response('success') \ No newline at end of file diff --git a/static-data/www/mail/index.html b/static-data/www/mail/index.html index c3233a6e..d762e6bb 100755 --- a/static-data/www/mail/index.html +++ b/static-data/www/mail/index.html @@ -21,6 +21,7 @@ + @@ -140,7 +141,7 @@