From f8ad07259c716572ed4aa66e26e4601dcb3e332e Mon Sep 17 00:00:00 2001 From: bakatrouble Date: Wed, 30 Jan 2019 20:11:31 +0300 Subject: [PATCH] add more pyrogram settings --- aggregator/client.py | 3 ++- aggregator/forms.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/aggregator/client.py b/aggregator/client.py index fdcd5d7..c771968 100644 --- a/aggregator/client.py +++ b/aggregator/client.py @@ -20,7 +20,8 @@ def get_client(takeout=False): session_path = os.path.relpath(default_storage.path(config.pyrogram_session.replace('.session', ''))) - return Client(session_path, config.pyrogram_app_id, config.pyrogram_app_hash, takeout=takeout) + return Client(session_path, config.pyrogram_app_id, config.pyrogram_app_hash, config.pyrogram_app_version or None, + config.pyrogram_device_model or None, config.pyrogram_system_version or None, takeout=takeout) def save_message(client, message: PyrogramMessage): diff --git a/aggregator/forms.py b/aggregator/forms.py index c27523e..91cabc6 100644 --- a/aggregator/forms.py +++ b/aggregator/forms.py @@ -43,6 +43,9 @@ class AggregatorAppConfigForm(ConfigForm): pyrogram_app_id = forms.CharField() pyrogram_app_hash = forms.CharField() + pyrogram_app_version = forms.CharField(required=False) + pyrogram_device_model = forms.CharField(required=False) + pyrogram_system_version = forms.CharField(required=False) pyrogram_session = forms.FileField() def save_session(self):