portal/webhook: handle unknown format

This commit is contained in:
Iain Learmonth 2022-05-15 18:44:02 +01:00
parent f495b1d079
commit 3e4862e142

View file

@ -12,12 +12,14 @@ from app.portal.util import response_404, view_lifecycle
bp = Blueprint("webhook", __name__)
@bp.app_template_filter("webhook_format_name")
def webhook_format_name(s: str) -> str:
if s == "telegram":
return "Telegram"
if s == "matrix":
return "Matrix"
return "Unknown"
class NewWebhookForm(FlaskForm):