mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-22 17:36:34 +03:00
Add setters for non-persistent values that apps might change
This commit is contained in:
parent
03d4ab3765
commit
e1d7cc541f
|
@ -100,26 +100,50 @@ class Session(ABC):
|
|||
def device_model(self):
|
||||
return self._device_model
|
||||
|
||||
@device_model.setter
|
||||
def device_model(self, value):
|
||||
self._device_model = value
|
||||
|
||||
@property
|
||||
def system_version(self):
|
||||
return self._system_version
|
||||
|
||||
@system_version.setter
|
||||
def system_version(self, value):
|
||||
self._system_version = value
|
||||
|
||||
@property
|
||||
def app_version(self):
|
||||
return self._app_version
|
||||
|
||||
@app_version.setter
|
||||
def app_version(self, value):
|
||||
self._app_version = value
|
||||
|
||||
@property
|
||||
def lang_code(self):
|
||||
return self._lang_code
|
||||
|
||||
@lang_code.setter
|
||||
def lang_code(self, value):
|
||||
self._lang_code = value
|
||||
|
||||
@property
|
||||
def system_lang_code(self):
|
||||
return self._system_lang_code
|
||||
|
||||
@system_lang_code.setter
|
||||
def system_lang_code(self, value):
|
||||
self._system_lang_code = value
|
||||
|
||||
@property
|
||||
def report_errors(self):
|
||||
return self._report_errors
|
||||
|
||||
@report_errors.setter
|
||||
def report_errors(self, value):
|
||||
self._report_errors = value
|
||||
|
||||
@property
|
||||
def time_offset(self):
|
||||
return self._time_offset
|
||||
|
@ -132,10 +156,18 @@ class Session(ABC):
|
|||
def flood_sleep_threshold(self):
|
||||
return self._flood_sleep_threshold
|
||||
|
||||
@flood_sleep_threshold.setter
|
||||
def flood_sleep_threshold(self, value):
|
||||
self._flood_sleep_threshold = value
|
||||
|
||||
@property
|
||||
def sequence(self):
|
||||
return self._sequence
|
||||
|
||||
@sequence.setter
|
||||
def sequence(self, value):
|
||||
self._sequence = value
|
||||
|
||||
def get_new_msg_id(self):
|
||||
"""Generates a new unique message ID based on the current
|
||||
time (in ms) since epoch"""
|
||||
|
|
|
@ -66,38 +66,6 @@ class MemorySession(Session):
|
|||
def salt(self, value):
|
||||
self._salt = value
|
||||
|
||||
@property
|
||||
def device_model(self):
|
||||
return self._device_model
|
||||
|
||||
@property
|
||||
def system_version(self):
|
||||
return self._system_version
|
||||
|
||||
@property
|
||||
def app_version(self):
|
||||
return self._app_version
|
||||
|
||||
@property
|
||||
def lang_code(self):
|
||||
return self._lang_code
|
||||
|
||||
@property
|
||||
def system_lang_code(self):
|
||||
return self._system_lang_code
|
||||
|
||||
@property
|
||||
def report_errors(self):
|
||||
return self._report_errors
|
||||
|
||||
@property
|
||||
def sequence(self):
|
||||
return self._sequence
|
||||
|
||||
@property
|
||||
def flood_sleep_threshold(self):
|
||||
return self._flood_sleep_threshold
|
||||
|
||||
def close(self):
|
||||
pass
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user