Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

de-duplication of received likes to prefer indie likes #65

Open
tantek opened this issue Jun 18, 2015 · 2 comments
Open

de-duplication of received likes to prefer indie likes #65

tantek opened this issue Jun 18, 2015 · 2 comments

Comments

@tantek
Copy link

tantek commented Jun 18, 2015

When a Red Wind post receives a webmention of from an indie like, Red Wind should de-duplicate it with any likes of the silo copy of that Red Wind post, and vice versa, always preferring the indie like, and showing it as one like, not two.

E.g. real world example of a Red Wind post with an indie like:

There should be enough information there to de-dup that into displaying a single like on the Red Wind post.

@kylewm
Copy link
Owner

kylewm commented Jun 18, 2015

Thank you for filing, though I'm still not convinced it's possible -- I don't see any fields in the two parsed results that can be correlated to tell that they are duplicates 😕

Here's the information I have from Brid.gy

{
  "items": [
    {
      "properties": {
        "author": [
          {
            "properties": {
              "name": [
                "Tantek \u00c7elik"
              ],
              "photo": [
                "https://twitter.com/t/profile_image?size=original"
              ],
              "url": [
                "https://twitter.com/t"
              ]
            },
            "type": [
              "h-card"
            ],
            "value": "Tantek \u00c7elik"
          }
        ],
        "like": [
          "https://twitter.com/kylewmahan/status/610521450290675713",
          "https://kylewm.com/2015/06/yes-https-is-more-work-to-support-than-http-so-let"
        ],
        "like-of": [
          "https://twitter.com/kylewmahan/status/610521450290675713",
          "https://kylewm.com/2015/06/yes-https-is-more-work-to-support-than-http-so-let"
        ],
        "name": [
          "likes this."
        ],
        "uid": [
          "tag:twitter.com,2013:610521450290675713_favorited_by_11628"
        ],
        "url": [
          "https://twitter.com/kylewmahan/status/610521450290675713"
        ]
      },
      "type": [
        "h-entry",
        "h-as-like"
      ]
    }
  ],
  "rel-urls": {},
  "rels": {}
}

and from the original

{
  "items": [
    {
      "properties": {
        "author": [
          {
            "properties": {
              "name": [
                "Tantek \u00c7elik"
              ],
              "photo": [
                "http://tantek.com/logo.jpg"
              ],
              "url": [
                "http://tantek.com/"
              ]
            },
            "type": [
              "h-card"
            ],
            "value": ""
          }
        ],
        "content": [
          {
            "html": "likes \n<a class=\"u-like-of\" href=\"https://kylewm.com/2015/06/yes-https-is-more-work-to-support-than-http-so-let\">Kyle Mahan\u2019s note</a>\n (<a class=\"u-like-of\" href=\"https://twitter.com/kylewmahan/status/610521450290675713\">@</a>)",
            "value": "likes \nKyle Mahan\u2019s note\n (@)"
          }
        ],
        "like-of": [
          "https://kylewm.com/2015/06/yes-https-is-more-work-to-support-than-http-so-let",
          "https://twitter.com/kylewmahan/status/610521450290675713"
        ],
        "name": [
          "likes \nKyle Mahan\u2019s note\n (@)"
        ],
        "published": [
          "2015-06-18T11:22:00-0700"
        ],
        "uid": [
          "http://tantek.com/2015/169/f1"
        ],
        "updated": [
          "2015-06-18T11:22:00-0700"
        ],
        "url": [
          "http://tantek.com/2015/169/f1"
        ]
      },
      "type": [
        "h-entry",
        "h-as-like"
      ]
    }
  ],
  "rel-urls": {
    "http://tantek.com/": {
      "rels": [
        "author",
        "home",
        "author"
      ],
      "text": "",
      "title": "Tantek \u00c7elik"
    },
    "http://tantek.com/2015/168/f1": {
      "rels": [
        "prev"
      ],
      "text": "\u2190",
      "title": "View the previous (older) item in the stream."
    },
    "http://tantek.com/logo.jpg": {
      "rels": [
        "icon"
      ],
      "text": ""
    },
    "http://webmention.io/tantek.com/webmention": {
      "rels": [
        "webmention"
      ],
      "text": ""
    }
  },
  "rels": {
    "author": [
      "http://tantek.com/",
      "http://tantek.com/"
    ],
    "home": [
      "http://tantek.com/"
    ],
    "icon": [
      "http://tantek.com/logo.jpg"
    ],
    "prev": [
      "http://tantek.com/2015/168/f1"
    ],
    "webmention": [
      "http://webmention.io/tantek.com/webmention"
    ]
  }
}
@tantek
Copy link
Author

tantek commented Jun 19, 2015

Hmm - looks like we may have to add another step:

  • check the Bridgy like-of author URL to see if it has a rel=me link, e.g. in the above JSON it's https://twitter.com/t which has rel=me link to tantek.com.
    Then if you have already have a like-of from that author, with permalink on that domain, you should be able to de-dup the Bridgy one.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants