This commit is contained in:
parent
b46de0d4f0
commit
c954488c28
@ -121,6 +121,6 @@ def facebook_webhook(request):
|
||||
logger.exception("Error processing webhook")
|
||||
return JsonResponse({"error": str(e)}, status=500)
|
||||
|
||||
# Anything else
|
||||
# Anything elses
|
||||
logger.warning(f"Received unsupported HTTP method: {request.method}")
|
||||
return HttpResponse("Method Not Allowed", status=405)
|
||||
|
@ -124,7 +124,7 @@ def handle_message_event(page_id: str, sender_psid: str, message: dict):
|
||||
Handles incoming Messenger messages:
|
||||
1) Log event to DB (like comments/shares)
|
||||
2) Generate AI reply with your configured OpenAI assistant for this page
|
||||
3) Send the reply via the Send API (using the page's access token)
|
||||
3) Send the sreply via the Send API (using the page's access token)
|
||||
"""
|
||||
try:
|
||||
# 0) ignore echoes to prevent loops
|
||||
|
Loading…
x
Reference in New Issue
Block a user