This commit is contained in:
Christian Rendina 2020-05-06 19:39:38 +02:00
parent 0f4d62f3c0
commit adb75dcc67

View File

@ -116,12 +116,10 @@ class Config:
return self.userAgent
def jsonasResponse(dct):
if "imageUrl" in dct:
return JSONResponse(dct["authorized"], dct["success"], dct["imageUrl"], "")
elif "htmlDescription" in dct:
return JSONResponse(dct["authorized"], dct["success"], "", dct["htmlDescription"])
else:
if not "imageUrl" in dct or not "htmlDescription" in dct:
raise Exception("Invalid JSON")
return JSONResponse(dct["authorized"], dct["success"], dct["imageUrl"], dct["htmlDescription"])
class InlineBot:
def __init__(self):