Fix embed being required in webhook

This commit is contained in:
rubenwardy 2023-01-05 09:43:27 +00:00
parent 540e24e8f9
commit 46b804834a

@ -22,7 +22,7 @@ from app.models import User
from app.tasks import celery from app.tasks import celery
@celery.task() @celery.task()
def post_discord_webhook(username: Optional[str], content: str, is_queue: bool, title: Optional[str], description: Optional[str], thumbnail: Optional[str]): def post_discord_webhook(username: Optional[str], content: str, is_queue: bool, title: Optional[str] = None, description: Optional[str] = None, thumbnail: Optional[str] = None):
discord_url = app.config.get("DISCORD_WEBHOOK_QUEUE" if is_queue else "DISCORD_WEBHOOK_FEED") discord_url = app.config.get("DISCORD_WEBHOOK_QUEUE" if is_queue else "DISCORD_WEBHOOK_FEED")
if discord_url is None: if discord_url is None:
return return