snarfed / bridgy-fed

🌉 A bridge between decentralized social network protocols
https://fed.brid.gy/
Creative Commons Zero v1.0 Universal
486 stars 28 forks source link

Participate in polls #641

Open snarfed opened 9 months ago

snarfed commented 9 months ago

Polls! https://github.com/snarfed/bridgy-fed/issues/395 is for just rendering them; the next step would be to let people actually post and vote in them.

Sadly, as of 9/2023, they're mostly incomplete across Bridgy Fed's protocols:

snarfed commented 9 months ago

Filed this just in time, looks like we're already receiving Updates for poll votes that are spamming webmentions. Original report in https://github.com/snarfed/bridgy/issues/1550. Here's an example activity from mastodon.social, below. It seems fine.

The problem is probably that the Update id has a fragment in it, which we include that in our webmention source URL, https://ap.brid.gy/convert/web/https:/mastodon.social/users/Edent/statuses/111069219037380638%23updates/1694783012 . The mf2 correctly has u-url set to the reply post itself, https:/mastodon.social/users/Edent/statuses/111069219037380638 , but I'm guessing most wm receivers don't de-dupe aggressively enough to use u-url as a key instead of source URL. Hrm. cc @dshanske

{
  "@context": "...",
  "id": "https://mastodon.social/users/Edent/statuses/111069219037380638#updates/1694782685",
  "type": "Update",
  "actor": "https://mastodon.social/users/Edent",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "object": {
    "id": "https://mastodon.social/users/Edent/statuses/111069219037380638",
    "type": "Question",
    "summary": null,
    "inReplyTo": "https://shkspr.mobi/blog/2023/09/using-selenium-chrome-to-automatically-download-blob-files/",
    "published": "2023-09-15T12:43:04Z",
    "url": "https://mastodon.social/@Edent/111069219037380638",
    "attributedTo": "https://mastodon.social/users/Edent",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public"
    ],
    "cc": [
      "https://mastodon.social/users/Edent/followers"
    ],
    "sensitive": false,
    "atomUri": "https://mastodon.social/users/Edent/statuses/111069219037380638",
    "inReplyToAtomUri": "https://shkspr.mobi/blog/2023/09/using-selenium-chrome-to-automatically-download-blob-files/",
    "conversation": "tag:mastodon.social,2023-09-15:objectId=536321548:objectType=Conversation",
    "content": "<p>Can you see this post?<br />If so, can you see the post it is in reply to?</p>",
    "contentMap": {
      "en": "<p>Can you see this post?<br />If so, can you see the post it is in reply to?</p>"
    },
    "endTime": "2023-09-22T12:43:04Z",
    "votersCount": 6,
    "attachment": [],
    "tag": [],
    "replies": {
      "id": "https://mastodon.social/users/Edent/statuses/111069219037380638/replies",
      "type": "Collection",
      "first": {
        "type": "CollectionPage",
        "next": "https://mastodon.social/users/Edent/statuses/111069219037380638/replies?only_other_accounts=true&page=true",
        "partOf": "https://mastodon.social/users/Edent/statuses/111069219037380638/replies",
        "items": []
      }
    },
    "oneOf": [
      {
        "type": "Note",
        "name": "I see this post and what it is replying to.",
        "replies": {
          "type": "Collection",
          "totalItems": 6
        }
      },
      {
        "type": "Note",
        "name": "I see this post, but not what it is in reply to.",
        "replies": {
          "type": "Collection",
          "totalItems": 0
        }
      },
      {
        "type": "Note",
        "name": "I cannot see this post \ud83d\ude43",
        "replies": {
          "type": "Collection",
          "totalItems": 0
        }
      }
    ]
  }
}