Citiverse
  • Multiple handles for Activity Intents

    Technical Discussion
    3 23 0

    julian@activitypub.spaceJ
    172
    0

    Hi @benpate@mastodon.social I've got a question about Activity Intents!

    I'm implementing it now (as you noticed) and have run into an interesting issue. The wording of 3b86 suggests that the intents are distinct between users. That is, the end user inputs their handle, the handle is queried via webfinger, and supported Intents are returned.

    However, the intents themselves don't really distinguish between users.

    So I could have a localStorage session with multiple handles registered (e.g. julian@activitypub.space, nodebb@fosstodon.org), etc. — this works fine.

    But if I had two handles with the same domain, alice@example.social and bob@example.social, then my intents can't be targeted, can they... I just fire off the request (or rather, I have the end user's browser navigate) to the intent URL and whatever account is logged in will be the actor.

    Did I miss something, or was there a way to distinguish actors in Activity Intents?

    P.S. I find it highly amusing that you had to click through to activitypub.space to read my whole post, but because I don't support Activity Intents yet, you can't reply properly <img class="not-responsive emoji" src="https://activitypub.space/assets/plugins/nodebb-plugin-emoji/emoji/android/1f923.png?v=9f67c8a21b0" title="🤣" />

  • benpate@mastodon.socialB
    43
    0

    @julian Forst, the fun part. Yes, I did have to click through to read the whole article, then swipe back to my Mastodon client (I love you, Ivory) to actually reply.

    If only there were something to smooth out this UX 🙂

  • benpate@mastodon.socialB
    43
    0

    @julian More importantly:

    You’re correct. There’s a bit of a problem if I’m visiting your website and I link two accounts from the same home server. Clicking either one will likely end up using whichever one I’m “signed into” at the moment.

    (Unless the server allows you to maintain multiple identities at the same time, but I don’t think that’s really a thing yet)

    Fortunately, this should be pretty rare outside of dev use cases. Most people have different identities on different servers.

  • benpate@mastodon.socialB
    43
    0

    @julian

    Also, how far along are you? If you’d like, you’re welcome to use, fork, or be inspired by my JS library - https://github.com/EmissarySocial/camperjs

    I still need to do some better documentation for it, but let me know if you’re interested and I’ll get writing today.

  • benpate@mastodon.socialB
    43
    0

    @julian @pfefferle

    It looks beautiful! Well done! I can't wait to try it out, as soon as you have it live 🙂

    And, I'd love to hear how it goes - if there are things we can make easier, document better, whatever. I still need to make an implementation guide, but just haven't been able to get it to the top of my stack.

    One thing I've been focused on recently is including a signup link in the workflow to help brand new people. Here's a silly demo of my latest: https://qwertylicious.dev/have-you-heard-of-qwertylicious

  • pfefferle@mastodon.socialP
    26
    0

    @julian @benpate I somehow feel a bit honored 😅

  • benpate@mastodon.socialB
    43
    0

    @julian

    You’re exactly right, and I don’t see it as a criticism at all. It’s an on-ramp that lets people explore slowly, then add capabilities gradually. It’s a chicken-and-egg problem.

    I also want a “reply” activity as well, but I’m afraid nobody would support it yet.

    So I look for {inReplyTo} in the create response to see if replies are possible, then register a “synthetic” activity for the application to discover. This lets me turn buttons on and off based on your servers abilities.

  • benpate@mastodon.socialB
    43
    0

    @julian

    I know.. agreement on the Fediverse is so rare, it’s almost scary 😉

    Yeah, Undo sounds like it makes sense in your case. I didn’t think of any in the beginning, so just overlooked it.

    One complicating factor is in showing the “state” of things in the remote site - we’d need a way to know that you voted for something first, so then we could undo it.

    But yeah, let’s add that into 3b86 as well. What kinds of parameters would you want to pass? Or, would you just want to write a PR?

  • benpate@mastodon.socialB
    43
    0

    @julian For sure. I'm probably tied up through the afternoon, but will put that together soon.

  • benpate@mastodon.socialB
    43
    0

    @julian This is fantastic. You're awesome, Julian!

    I'll try to take a look at this tonight/tomorrow.

    Once you're at a stopping point, would it be possible for you to list out the intents you publish and receive? I'd love to include that in the Implementations section at the bottom of the document.

  • benpate@mastodon.socialB
    43
    0

    @julian Yeah, it’s probably a good learning experience, too.

    Camper doesn’t do the dialogs, though. It’s behind the scenes turning buttons on and off based on what it can find in the WebFinger results.

    It might be useful to look at - and certainly feel free to steal any good ideas for your own code.

  • julian@activitypub.spaceJ
    172
    0

    > @benpate@mastodon.social said:
    >
    > Once you're at a stopping point, would it be possible for you to list out the intents you publish and receive?

    NodeBB as a home server will support Object, Create, Like, Dislike, and Follow.

    As a client, we have buttons for Create (topic creation and reply), Like/Dislike (upvote and downvote), and Follow.

  • benpate@mastodon.socialB
    43
    0

    @julian I'm writing this up now. Do you also use the {context} property? Should I include this as well?

  • julian@activitypub.spaceJ
    172
    0

    @benpate@mastodon.social unrelatedly, I don't know why I am not receiving your posts... I re-followed you again just in case.

  • benpate@mastodon.socialB
    43
    0

    @julian

    That makes sense. I’ve been building out contexts for conversations, so it’s top of mind for me. But it makes sense that audience and inReplyTo might be enough. If the context is missing, I’d probably just fill in the context from the parent anyway.

  • benpate@mastodon.socialB
    43
    0

    @julian I can do that. Both terms *are* in the Activity Vocabulary, so we're well within the spec to include them here. But yeah, it would be good to include a note that points to the FEPs where they're really defined.

    Ok. More to do... 😅

  • benpate@mastodon.socialB
    43
    0

    @julian You can certainly use the intent buttons on Bandwagon and the Qwertylicious demo site. They're actually two different implementations, so it might be valid to try both of them.

    I'm pretty sure that @pfefferle has implemented some buttons in the WordPress plugin - Matthias, do you have a demo site we can test with?

    And, I know Mastodon's Activity Intent work has landed, but I'm not familiar enough with their buttons to say which is being powered by Activity Intents, or how.

  • pfefferle@mastodon.socialP
    26
    0

    @julian @benpate there is also a big "follow" button at the top of the site: https://activitypub.blog/

  • pfefferle@mastodon.socialP
    26
    0

    @julian @benpate 😱

    I think I broke something!?


Citiverse è un progetto che si basa su NodeBB ed è federato! | Categorie federate | Chat | 📱 Installa web app o APK | 🧡 Donazioni | Privacy Policy

Il server utilizzato è quello di Webdock, in Danimarca. Se volete provarlo potete ottenere il 20% di sconto con questo link e noi riceveremo un aiuto sotto forma di credito da usare proprio per mantenere Citiverse.