2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-08 18:25:16 +00:00

Make session leaner by removing some redundant parameters

Related to #86
This commit is contained in:
Dan
2018-06-24 18:26:11 +02:00
parent 56f616c753
commit f4c0793a0b
3 changed files with 47 additions and 58 deletions

View File

@@ -16,17 +16,34 @@
# You should have received a copy of the GNU Lesser General Public License
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
import platform
import re
from queue import Queue
from threading import Lock
from pyrogram import __version__
from ..style import Markdown, HTML
from ...api.core import Object
from ...session.internals import MsgId
from ...session import Session
from ...session.internals import MsgId
class BaseClient:
APP_VERSION = "Pyrogram \U0001f525 {}".format(__version__)
DEVICE_MODEL = "{} {}".format(
platform.python_implementation(),
platform.python_version()
)
SYSTEM_VERSION = "{} {}".format(
platform.system(),
platform.release()
)
SYSTEM_LANG_CODE = "en"
LANG_CODE = "en"
INVITE_LINK_RE = re.compile(r"^(?:https?://)?(?:www\.)?(?:t(?:elegram)?\.(?:org|me|dog)/joinchat/)([\w-]+)$")
BOT_TOKEN_RE = re.compile(r"^\d+:[\w-]+$")
DIALOGS_AT_ONCE = 100