Cleaner no title
This commit is contained in:
parent
2570726524
commit
459a0462f7
5
app.py
5
app.py
|
@ -18,8 +18,11 @@ async def main():
|
|||
|
||||
@app.route("/push", methods = ["POST"])
|
||||
async def push():
|
||||
title = request.form.get('title', 'No title')
|
||||
title = request.form.get('title', None)
|
||||
body = request.form.get('body', 'No body')
|
||||
if title is None:
|
||||
await bot.send_message(chat, text = body, parse_mode = 'html')
|
||||
else:
|
||||
await bot.send_message(chat, text = '<b>' + title + '</b>\n\n' + body, parse_mode = 'html')
|
||||
return 'ok'
|
||||
|
||||
|
|
Loading…
Reference in New Issue