Skip to content

Commit

Permalink
Changed connection import
Browse files Browse the repository at this point in the history
  • Loading branch information
Randall Lawrence committed Jul 19, 2019
1 parent 351866d commit e40cd9f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mautrix_telegram/abstract_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import platform
import time

from telethon.network import ConnectionTcpMTProxyRandomizedIntermediate, ConnectionTcpFull
from telethon.tl.patched import MessageService, Message
from telethon.tl.types import (
Channel, ChannelForbidden, Chat, ChatForbidden, MessageActionChannelMigrateFrom, PeerUser,
Expand Down Expand Up @@ -121,11 +122,10 @@ def _init_client(self) -> None:
device = config["telegram.device_info.device_model"]
sysversion = config["telegram.device_info.system_version"]
appversion = config["telegram.device_info.app_version"]
import telethon
connection = telethon.network.connection.ConnectionTcpFull
connection = ConnectionTcpFull
proxy = self._proxy_settings
if proxy is not None and proxy[0] == 4:
connection = telethon.network.connection.ConnectionTcpMTProxyRandomizedIntermediate
connection = ConnectionTcpMTProxyRandomizedIntermediate
proxy = (proxy[1], proxy[2], proxy[5])

self.client = MautrixTelegramClient(
Expand Down

0 comments on commit e40cd9f

Please sign in to comment.