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):