Skip to content

Commit

Permalink
Disable debug log when creating peer type chat portal. Fixes #389
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Dec 1, 2019
1 parent af0f731 commit 69d56f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mautrix_telegram/portal/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,9 +401,11 @@ def get_by_tgid(cls, tgid: TelegramID, tg_receiver: Optional[TelegramID] = None,

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
Expand Down

0 comments on commit 69d56f4

Please sign in to comment.