From 45d18c1160094b6d9eef38c8443621d09da8ba0e Mon Sep 17 00:00:00 2001 From: hikariatama Date: Mon, 30 May 2022 18:05:09 +0000 Subject: [PATCH] Allow app creation even if no telegram creds were specified --- hikka/heroku.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/hikka/heroku.py b/hikka/heroku.py index f03bbcc..53746d2 100644 --- a/hikka/heroku.py +++ b/hikka/heroku.py @@ -66,14 +66,18 @@ def get_app( for poss_app in heroku.apps(): config = poss_app.config() - if api_token is None or ( - config["api_id"] == api_token.ID and config["api_hash"] == api_token.HASH - ): + if ( + api_token is None + or ( + config["api_id"] == api_token.ID + and config["api_hash"] == api_token.HASH + ) + ) and poss_app.name.startswith("hikka"): app = poss_app break if app is None: - if api_token is None or not create_new: + if not create_new: logging.error("%r", {app: repr(app.config) for app in heroku.apps()}) raise RuntimeError("Could not identify app!")