Gave more power to the TelegramClients and bug fixes

Fixed uploads for large files on TcpClient
Added more RPCError's for handling invalid phone code
Added more media handlers: now you're also able to
  both send and download documents!
The InteractiveTelegramClient now supports working
  with media aswell
This commit is contained in:
Lonami
2016-09-12 19:32:16 +02:00
parent 13f7e6170f
commit 9420e15283
7 changed files with 208 additions and 58 deletions

View File

@@ -1,4 +1,5 @@
import os
import shutil
from utils import BinaryWriter
import hashlib
@@ -30,6 +31,14 @@ def load_settings(path='api/settings'):
return settings
def ensure_parent_dir_exists(file_path):
"""Ensures that the parent directory exists"""
parent = os.path.dirname(file_path)
if parent:
os.makedirs(parent, exist_ok=True)
# endregion
# region Cryptographic related utils