portal/webhook: handle unknown format
This commit is contained in:
parent
f495b1d079
commit
3e4862e142
1 changed files with 2 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue