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:
|
if peer_type:
|
||||||
cls.log.info(f"Creating portal for {peer_type} {tgid} (receiver {tg_receiver})")
|
cls.log.info(f"Creating portal for {peer_type} {tgid} (receiver {tg_receiver})")
|
||||||
if peer_type == "chat":
|
# TODO enable this for non-release builds
|
||||||
import traceback
|
# (or add better wrong peer type error handling)
|
||||||
cls.log.info("Chat portal stack trace:\n" + "".join(traceback.format_stack()))
|
# 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 = cls(tgid, peer_type=peer_type, tg_receiver=tg_receiver)
|
||||||
portal.db_instance.insert()
|
portal.db_instance.insert()
|
||||||
return portal
|
return portal
|
||||||
|
|||||||
Reference in New Issue
Block a user