Disable debug log when creating peer type chat portal. Fixes #389
This commit is contained in:
@@ -401,9 +401,11 @@ class BasePortal(ABC):
|
||||
|
||||
if peer_type:
|
||||
cls.log.info(f"Creating portal for {peer_type} {tgid} (receiver {tg_receiver})")
|
||||
if peer_type == "chat":
|
||||
import traceback
|
||||
cls.log.info("Chat portal stack trace:\n" + "".join(traceback.format_stack()))
|
||||
# TODO enable this for non-release builds
|
||||
# (or add better wrong peer type error handling)
|
||||
# if peer_type == "chat":
|
||||
# import traceback
|
||||
# cls.log.info("Chat portal stack trace:\n" + "".join(traceback.format_stack()))
|
||||
portal = cls(tgid, peer_type=peer_type, tg_receiver=tg_receiver)
|
||||
portal.db_instance.insert()
|
||||
return portal
|
||||
|
||||
Reference in New Issue
Block a user