# Autobot plugin - Duplicate posts problem

**URL:** <https://meta.discourse.org/t/autobot-plugin-duplicate-posts-problem/74806>\
**Category:** Product Support\
**Created:** [November 12, 2017, 3:27pm UTC](https://meta.discourse.org/t/autobot-plugin-duplicate-posts-problem/74806 "2017-11-12T15:27:09Z")\
**Posts on this page:** 1\
**Showing post:** 15

<div class="post-metadata">

**Author:** ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)\
**Post date:** [November 22, 2017, 6:32am UTC](https://meta.discourse.org/t/autobot-plugin-duplicate-posts-problem/74806/15 "2017-11-22T06:32:20Z")

</div>

If you deleted the first post, then you’ll get duplicated posts _forever_. You have to change the URL.

Basically the first post is the most important. If it is deleted, a new post will be created during every refresh.

Deleting the campaign won’t help because the plugin won’t distinguish between different campaigns. This is probably also a potential problem, if an item is ever shared between two different feeds in two different topics/categories. They’ll never duplicate in this case.

Source:

> <https://github.com/vinkashq/discourse-autobot/blob/master/lib/autobot/post_creator.rb#L111>

It probably should be something like:

```plaintext
PostCustomField
    .where(name: "autobot_source_url", value: source_url)
    .where(name: "autobot_campaign_id", value: campaign["id"])
    .first.try(:post)

```

---

_[View the full topic](https://meta.discourse.org/t/autobot-plugin-duplicate-posts-problem/74806)._
