add more pyrogram settings
This commit is contained in:
parent
459de8c00c
commit
f8ad07259c
@ -20,7 +20,8 @@ def get_client(takeout=False):
|
|||||||
|
|
||||||
session_path = os.path.relpath(default_storage.path(config.pyrogram_session.replace('.session', '')))
|
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):
|
def save_message(client, message: PyrogramMessage):
|
||||||
|
@ -43,6 +43,9 @@ class AggregatorAppConfigForm(ConfigForm):
|
|||||||
|
|
||||||
pyrogram_app_id = forms.CharField()
|
pyrogram_app_id = forms.CharField()
|
||||||
pyrogram_app_hash = 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()
|
pyrogram_session = forms.FileField()
|
||||||
|
|
||||||
def save_session(self):
|
def save_session(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user