DiscipleTools / disciple-tools-facebook

Adds integration to Facebook pages and creates contacts from Direct Message conversations. This is a key plugin for outreach through Facebook.
https://disciple.tools/plugins/facebook/
Other
4 stars 1 forks source link

Duplicate comments created #37

Open cairocoder01 opened 4 days ago

cairocoder01 commented 4 days ago

With a FB integration we have, it seems that comments are being duplicated. From what I can tell, it happens on a contact that has been active over a longer period of time. So it might be that when the conversation gets reactivated, it pulls the whole history again. In the comment panel on a single contact, I can see that the oldest conversations are duplicated more times. The most recent convos are not duplicated at all.

So I think when new comments are added, it should check if it already exists. Or it needs to not add comments before the last update.

image

corsacca commented 4 days ago

@cairocoder01 can you confirm that system cron jobs are set up and that this is true in the config.php? define('DISABLE_WP_CRON', true);

That is my best guess to what is causing this issue at the moment

cairocoder01 commented 4 days ago

Ah, that wasn't set on this site, even though I had an uptimerobot trying to run the CRON. Hopefully that resolves this going forward.

Any insight why that would have caused this?

corsacca commented 4 days ago

I think it is from multiple requests happening at the same time that each trigger the cron jobs to run.