Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

publish: support multi-type posts (not planned) #832

Closed

Description

@snarfed

cc @tantek @kartikprabhu. experimental use case: https://indieweb.org/tag-reply#tag_and_comment

the difficulty is, when we convert to AS1 internally, we need to represent it as both a reply and a tag-of, and AS1 doesn't really handle multiple types (or objects) in a single activity: http://activitystrea.ms/specs/json/1.0/#activity , http://activitystrea.ms/specs/json/1.0/#rfc.section.3.4 . that's fine, i can make granary handle multiply valued objectType and verb, it'll just take some work.

in the short term , the more likely answer is that i'll fail fast with a nicer human readable error instead of crashing.

IRC discussion (and earlier). stack trace from the log:

Traceback (most recent call last):
  at json_to_object (/base/data/home/apps/s~brid-gy/8.410945048477799522/local/lib/python2.7/site-packages/granary/microformats2.py:463)
    obj = microformats2.json_to_object(item)
  at attempt_single_item (/base/data/home/apps/s~brid-gy/8.410945048477799522/publish.py:355)
    assert not obj.get('object')
AssertionError

simplified mf2:

{
  "type": ["h-entry"],
  "properties": {
    "tag-of": [{"value": "https://a/post"}],
    "in-reply-to": [{"value": "https://another/post"}],
  }
}

possible AS1 that we could convert it to:

{
  "objectType": ["activity", "comment"],
  "verb": "tag",
  "target": {"url": "https://a/post"},
  "inReplyTo": {"url": "https://another/post"},
}

activity is a qualitatively different object type than comment, so combining them like this is really awkward, and i don't know how to indicate that the tag verb only applies to activity. i expect these and other problems are why AS1 made them singly valued in the first place. :trollface:

Activity

  1. snarfed commented on Jul 13, 2018

    @snarfed
    OwnerAuthor

    ...not to mention that i'd have to make granary reasonably handle or error out on multiply valued objectType/verb everywhere. nontrivial. 🙁

  2. snarfed commented on Jul 13, 2018

    @snarfed
    OwnerAuthor
  3. changed the title [-]github publish: crash on reply post with tag-of[/-] [+]github publish: support combined reply and tag-of posts (low priority)[/+] on Jul 17, 2018
  4. snarfed commented on Jul 17, 2018

    @snarfed
    OwnerAuthor

    ok, the crash is now a nice 400 with error message. renamed this issue to cover actually supporting combined reply and tag-of. (low priority, not anytime soon.)

  5. snarfed commented on Nov 25, 2018

    @snarfed
    OwnerAuthor

    I'm generalizing this issue to cover all multi-type posts that Bridgy Publish would have to translate to more than one action inside a silo.

    i don't plan to support those, for a few reasons beyond just the AS1 implementation details above. specifically:

    • atomicity. right now, a bridgy publish request either succeeds completely or falls completely. multi-type parts could partially succeed, ie complete one action inside the silo but fail another.
    • recovery. when an attempt partially succeeds, and the user retries, what should we do? we can't always roll back the silo action, nor can we always safely retry just the failed part(s). more on that in retry failed publish attempts? (dangerous) #812.
    • UX. it's harder to clearly preview a multi-type post or communicate about it to the user in error messages, etc.
    • partial support. if we can publish one part of a multi-type post but not another, it's unclear what we should do.

    this begs the question, what should we do with multi type posts then? we could either return an error, which we currently do with the reply+tag posts described here, or we could pick a single part of them, which we currently do with all other multi-type posts. i documented that in b42365f yesterday.

    erroring out is probably safer, and follows the Principle of Least Surprise, but publishing a single part is more convenient and expected by current users. 🤷

  6. changed the title [-]github publish: support combined reply and tag-of posts (low priority)[/-] [+]publish: support multi-type posts (not planned)[/+] on Nov 25, 2018
  7. snarfed commented on Jan 15, 2019

    @snarfed
    OwnerAuthor

    i'm doing a sweep and closing issues that i don't plan to do myself or accept a PR for. apologies for the bad news, or if this is a surprise. feel free to reopen if you feel strongly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions