Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

NodeBB

  1. Home
  2. Technical Discussion
  3. On Tags (including Hash-Tags) in ActivityPub.

On Tags (including Hash-Tags) in ActivityPub.

Scheduled Pinned Locked Moved Technical Discussion
activitypubactivitystreamsfedidevhashtaghashtags
1 Cross-posts 7 Posts 4 Posters 2 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • reiver@mastodon.socialR This user is from outside of this forum
    reiver@mastodon.socialR This user is from outside of this forum
    reiver@mastodon.social
    wrote last edited by
    #1

    On Tags (including Hash-Tags) in ActivityPub.

    1/

    I think new developers coming to ActivityPub want to write something like:

    "tag": ["apple", "banana", "cherry"]

    It is unfortunate that that isn't valid ActivityPub. But, that it must instead be:

    "tag": [
    {
    "type": "Hashtag",
    "name": "#apple"
    },
    {
    "type": "Hashtag",
    "name": "#banana"
    },
    {
    "type": "Hashtag",
    "name": "#cherry"
    }
    ]

    ...

    #ActivityPub #ActivityStreams #FediDev #HashTag #HashTags #Tag #Tags

    reiver@mastodon.socialR toddsundsted@epiktistes.comT evan@activitypub.spaceE julian@activitypub.spaceJ 4 Replies Last reply
    1
    • ? Guest crossposted this topic to General Discussion
    • reiver@mastodon.socialR reiver@mastodon.social

      On Tags (including Hash-Tags) in ActivityPub.

      1/

      I think new developers coming to ActivityPub want to write something like:

      "tag": ["apple", "banana", "cherry"]

      It is unfortunate that that isn't valid ActivityPub. But, that it must instead be:

      "tag": [
      {
      "type": "Hashtag",
      "name": "#apple"
      },
      {
      "type": "Hashtag",
      "name": "#banana"
      },
      {
      "type": "Hashtag",
      "name": "#cherry"
      }
      ]

      ...

      #ActivityPub #ActivityStreams #FediDev #HashTag #HashTags #Tag #Tags

      reiver@mastodon.socialR This user is from outside of this forum
      reiver@mastodon.socialR This user is from outside of this forum
      reiver@mastodon.social
      wrote last edited by
      #2

      On Tags (including Hash-Tags) in ActivityPub.

      2/

      A new version of ActivityPub could extend the type of "tag" from:

      Object | Link

      to:

      Object | Link | xsd:string

      And that would make the following valid ActivityPub:

      "tag": ["apple", "banana", "cherry"]

      Of course, it would have to be specified how to interpret this. (Ex: as "type":"Hashtag", or whatever.)

      #ActivityPub #ActivityStreams #FediDev #HashTag #HashTags #Tag #Tags

      1 Reply Last reply
      1
      • reiver@mastodon.socialR reiver@mastodon.social

        On Tags (including Hash-Tags) in ActivityPub.

        1/

        I think new developers coming to ActivityPub want to write something like:

        "tag": ["apple", "banana", "cherry"]

        It is unfortunate that that isn't valid ActivityPub. But, that it must instead be:

        "tag": [
        {
        "type": "Hashtag",
        "name": "#apple"
        },
        {
        "type": "Hashtag",
        "name": "#banana"
        },
        {
        "type": "Hashtag",
        "name": "#cherry"
        }
        ]

        ...

        #ActivityPub #ActivityStreams #FediDev #HashTag #HashTags #Tag #Tags

        toddsundsted@epiktistes.comT This user is from outside of this forum
        toddsundsted@epiktistes.comT This user is from outside of this forum
        toddsundsted@epiktistes.com
        wrote last edited by
        #3

        @reiver i don't mind type but the leading hash always feels redundant

        julian@activitypub.spaceJ 1 Reply Last reply
        0
        • reiver@mastodon.socialR reiver@mastodon.social

          On Tags (including Hash-Tags) in ActivityPub.

          1/

          I think new developers coming to ActivityPub want to write something like:

          "tag": ["apple", "banana", "cherry"]

          It is unfortunate that that isn't valid ActivityPub. But, that it must instead be:

          "tag": [
          {
          "type": "Hashtag",
          "name": "#apple"
          },
          {
          "type": "Hashtag",
          "name": "#banana"
          },
          {
          "type": "Hashtag",
          "name": "#cherry"
          }
          ]

          ...

          #ActivityPub #ActivityStreams #FediDev #HashTag #HashTags #Tag #Tags

          evan@activitypub.spaceE This user is from outside of this forum
          evan@activitypub.spaceE This user is from outside of this forum
          evan@activitypub.space
          wrote last edited by
          #4

          There's a definition for Hashtag here:

          https://swicg.github.io/miscellany/#Hashtag

          1 Reply Last reply
          0
          • reiver@mastodon.socialR reiver@mastodon.social

            On Tags (including Hash-Tags) in ActivityPub.

            1/

            I think new developers coming to ActivityPub want to write something like:

            "tag": ["apple", "banana", "cherry"]

            It is unfortunate that that isn't valid ActivityPub. But, that it must instead be:

            "tag": [
            {
            "type": "Hashtag",
            "name": "#apple"
            },
            {
            "type": "Hashtag",
            "name": "#banana"
            },
            {
            "type": "Hashtag",
            "name": "#cherry"
            }
            ]

            ...

            #ActivityPub #ActivityStreams #FediDev #HashTag #HashTags #Tag #Tags

            julian@activitypub.spaceJ This user is from outside of this forum
            julian@activitypub.spaceJ This user is from outside of this forum
            julian@activitypub.space
            wrote last edited by
            #5

            @reiver@mastodon.social hmm, I don't much mind the "type": "Hashtag" bit. Additional specificity is helpful in the long-run I think.

            For example, tag contains hashtags, but it also contains mentions, "type": "Mention", so that actually makes sense.

            Additional stuff that falls under the rather general name "tag" could also fit. Tagging a location, tagging an Event, etc.

            This might also be what @evan was talking about, I didn't click through his link yet <img class="not-responsive emoji" src="https://activitypub.space/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61c.png?v=f187f9278b7" title="😜" />

            1 Reply Last reply
            0
            • toddsundsted@epiktistes.comT toddsundsted@epiktistes.com

              @reiver i don't mind type but the leading hash always feels redundant

              julian@activitypub.spaceJ This user is from outside of this forum
              julian@activitypub.spaceJ This user is from outside of this forum
              julian@activitypub.space
              wrote last edited by
              #6

              > @toddsundsted@epiktistes.com said:
              >
              > <p><a href="/user/reiver%40mastodon.social" rel="tag">@reiver</a> i don't mind <code>type</code> but the leading hash always feels redundant</p>

              haha don't worry, it's optional.

              And by optional, I mean there's no specification about it, and so it's de facto part of it because Mastodon does it, but importantly, Peertube doesn't!

              So you can really just do whatever you want. Omit the #, I think Mastodon and most other software handles it fine.

              1 Reply Last reply
              0
              • toddsundsted@epiktistes.comT This user is from outside of this forum
                toddsundsted@epiktistes.comT This user is from outside of this forum
                toddsundsted@epiktistes.com
                wrote last edited by
                #7

                @julian @reiver soooo many edge cases! 😀

                1 Reply Last reply
                0

                Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                With your input, this post could be even better 💗

                Register Login
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                Powered by NodeBB Contributors
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups