You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if i re deploy the bot on heruku, it's looping through the old messages and spamming.
PLS HELP TO FIX IT!'
HEREUKU LOGS!
if request.method == 'POST':
body = request.getjson()
print(body)
if body.get("object") and body.get("entry") and body["entry"][0].get("changes") and
body["entry"][0]["changes"][0].get("value").get("messages"):
from = body["entry"][0]["changes"][0]["value"]["messages"][0]["from"]
msg_id = body["entry"][0]["changes"][0]["value"]["messages"][0]["id"]
datetime_str = body["entry"][0]["changes"][0]["value"]["messages"][0]["timestamp"]
msgbody = body["entry"][0]["changes"][0]["value"]["messages"][0].get("text", {}).get("body", "")
name = body["entry"][0]["changes"][0]["value"]["contacts"][0]["profile"]["name"]
The text was updated successfully, but these errors were encountered:
Can you provide more context about the scenario, Like the snippet of webhook you're running and if there are errors being raised causing the messages to be resent?
if i re deploy the bot on heruku, it's looping through the old messages and spamming.
PLS HELP TO FIX IT!'
HEREUKU LOGS!
if request.method == 'POST':
body = request.getjson()
print(body)
if body.get("object") and body.get("entry") and body["entry"][0].get("changes") and
body["entry"][0]["changes"][0].get("value").get("messages"):
from = body["entry"][0]["changes"][0]["value"]["messages"][0]["from"]
msg_id = body["entry"][0]["changes"][0]["value"]["messages"][0]["id"]
datetime_str = body["entry"][0]["changes"][0]["value"]["messages"][0]["timestamp"]
msgbody = body["entry"][0]["changes"][0]["value"]["messages"][0].get("text", {}).get("body", "")
name = body["entry"][0]["changes"][0]["value"]["contacts"][0]["profile"]["name"]
The text was updated successfully, but these errors were encountered: