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

figure out user and post discovery #18

Closed
snarfed opened this issue Oct 17, 2017 · 16 comments

Comments

Projects
None yet
4 participants
@snarfed
Copy link
Owner

commented Oct 17, 2017

should have thought of this earlier. right now, the first thing many users are doing is trying to discover themselves in mastodon and hubzilla, not send a response. so far, not much luck. we should figure that out.

mastodon background in tootsuite/mastodon#1441 (comment) , which claims that atom feed with PuSH hub and webfinger with atom, profile, salmon, and magic key links should be enough...but that's evidently not true, since @miklb @mblaney @aaronpk all have those, and they still can't discover their sites from inside mastodon.

(i do show up inside mastodon, as @me@snarfed.org, which is misleading. that's probably only because i've federated replies etc into it.)

@snarfed

This comment has been minimized.

Copy link
Owner Author

commented Oct 29, 2017

seems like there's been some progress here. some of us are now having better luck finding and seeing our indieweb sites. e.g. searching for @snarfed.org@snarfed.org in https://mastodon.art/ worked and found me, even though i'd never interacted with anyone there before. maybe improvements in mastodon 2.0, maybe the username fix on our end (#3, tootsuite/mastodon#5523); who knows.

@aaronpk

This comment has been minimized.

Copy link

commented Jan 11, 2018

I was able to search for my new profile @aaronpk.com@aaronpk.com on mastodon.social and it found me. I haven't seen any content come through yet tho.

@miklb

This comment has been minimized.

Copy link

commented Jan 11, 2018

I can also confirm after fixing my h-card @miklb.com@miklb.com shows up in a search on mastodon.social

Haven't posted since the fix so not expecting content to be viewable at this point, but definitely step in right direction.

@swentel

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2018

@realize.be@realize.be can also be found when searching. Following the user kind of works it seems, but it doesn't show up at my followers when clicking, after hitting I can't remove/follow anymore.

I'm also seeing requests on my site coming in like this:

GET /api/v1/instance HTTP/1.1" 404 16085 "-" "MastodonInstances (https://instances.social)"

It's a 404 of course, wondering whether we can ignore that or not ? (but maybe this is not related with discovery or posts anyway)

@swentel

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2018

So the fact I can't follow/remove anymore when searching (I see an hourglass now) is maybe because I now have to confirm the request from '''@realize.be@realize.be''' to https://mastodon.social/@swentel - but not sure how I would do that :)

search-realize

This is the response from the search:


accounts | […]
-- | --
0 | {…}
id | 363584
username | realize.be
acct | realize.be@realize.be
display_name | swentel
locked | false
bot | false
created_at | 2018-05-25T16:39:10.741Z
note |  
url | https://fed.brid.gy/realize.be
avatar | https://files.mastodon.social/accounts/avatars/000/363/584/original/cf6d4d4f9f4e96a7.png
avatar_static | https://files.mastodon.social/accounts/avatars/000/363/584/original/cf6d4d4f9f4e96a7.png
header | https://files.mastodon.social/accounts/headers/000/363/584/original/8cae10445ab73393.png
header_static | https://files.mastodon.social/accounts/headers/000/363/584/original/8cae10445ab73393.png
followers_count | 0
following_count | 0
statuses_count | 0
emojis | []
fields | []
statuses | []
hashtags | []

And this is the response mastodon does on that account to get relationships:
(https://mastodon.social/api/v1/accounts/relationships?id[]=363584)


0 | {…}
-- | --
id | 363584
following | false
showing_reblogs | true
followed_by | false
blocking | false
muting | false
muting_notifications | false
requested | true
domain_blocking | false
endorsed | false
@swentel

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2018

To confirm: the hourglass is because @realize.be@realize.be needs to approve the request :)

<div class="account__relationship">
<button aria-label="Awaiting approval. Click to cancel follow request" title="Awaiting approval. Click to cancel follow request" class="icon-button disabled" style="font-size: 18px; width: 23.1429px; height: 23.1429px; line-height: 18px;" tabindex="0">
<i class="fa fa-fw fa-hourglass" aria-hidden="true">
</i></button></div>

So, wondering if this expires at some point.

@snarfed

This comment has been minimized.

Copy link
Owner Author

commented Sep 20, 2018

thanks for all the experimenting @swentel!

I now have to confirm the request from '''@realize.be@realize.be''' to https://mastodon.social/@swentel - but not sure how I would do that :)

i expect this is part of #21. we'd probably need to accept the AP Follow request and reply with AP Accept.

(PRs welcome, as always!)

@swentel

This comment has been minimized.

Copy link
Contributor

commented Sep 27, 2018

So re: post discovery. I know aaron, when posting a note, sends an AP request to his followers. I've been able to do that as well by sending an object which resembles a reply post, but without the 'inReplyTo' property and send it to the shared inbox of an instance with the followers + https://www.w3.org/ns/activitystreams#Public in the to property.

So it's basically the same as the reply mechanism that exist already, maybe it even works out of the box, haven't tested that yet - but we'll currently run on the same id/actor host comparison problem.

@swentel

This comment has been minimized.

Copy link
Contributor

commented Oct 17, 2018

So I may have a lead to the discovery of posts. When an account has a hub, and when you follow, mastodon will try to subscribe to your atom feed. The problem, if I'm right, is on following line:

https://github.com/tootsuite/mastodon/blob/master/app/services/subscribe_service.rb#L38

It generates a callback url based on the account id. I haven't figured out what api_subscription_url exactly returns (I really can't find the function and it doesn't really look like an external library function), but, what's interesting is that it uses the account.id. That one will eventually point to fed.bridgy, so in the end, verification by the hub on that callback will fail, because it simply doesn't exist.

By looking in tootsuite/mastodon#1884, it seems like that callback url will be something like fed.bridgy/api/subscriptions (I don't think the domain will be in it).

So, if that's really the case, that callback needs be created which returns the challenge by the hub so the subscription can happen. Maybe you could check the logs to see if there is call from (bridgy-fed.)superfeedr.com somewhere ?

@snarfed

This comment has been minimized.

Copy link
Owner Author

commented Oct 17, 2018

interesting! i don't see any requests to any /api/* paths in the last couple months. i do see POST requests from superfeedr to the home page, https://fed.brid.gy/. maybe that's it? that could be superfeedr's subscription callback, even though the docs say it's just for pro (paid) accounts.

i've updated that to be a specific path, and i'll log the body, so now if we try following a bridgy fed user, we can maybe see if it's relevant.

snarfed added a commit that referenced this issue Oct 17, 2018

@swentel

This comment has been minimized.

Copy link
Contributor

commented Oct 18, 2018

Hmm, if you check https://bridgy-fed.superfeedr.com/, you see the hub.callback there, so I /think/ there's two of those callbacks (unless I'm reading it wrong again heh)

And yes, maybe it will just go the root of the domain. I'd say, follow my account with your mastodon user. I haven't checked whether the subscription happens before or after the accept, but I can send an AP accept call from my machine if I have the request :)

@swentel

This comment has been minimized.

Copy link
Contributor

commented Oct 18, 2018

re: user discovery - copy pasted from IRC: "I think the documentation only needed is something like "Interact with an instance mastodon once, and you'll be discovered at some point That's all there really is to."

I've seen the code a couple of times now. And mastodon creates an account if it doesn't exist yet, and then starts syncing to other instances.

@snarfed

This comment has been minimized.

Copy link
Owner Author

commented Oct 18, 2018

Hmm, if you check https://bridgy-fed.superfeedr.com/, you see the hub.callback there, so I /think/ there's two of those callbacks (unless I'm reading it wrong again heh)

true! two different callbacks, for different clients. the one i mentioned is superfeedr's callback to me, the bridgy fed owner, when a new followers subscribes. the one mentioned on https://bridgy-fed.superfeedr.com/ is for followers, to notify them when there's a new post.

...regardless, https://bridgy-fed.superfeedr.com/ isn't actually set up to do anything right now. as mentioned in #33 (comment), it's just a no-op WebSub hub to satisfy mastodon requiring one in the atom feed. if we need the hub to actually do anything, we should rethink, and/or maybe switch to full AP delivery.

@snarfed

This comment has been minimized.

Copy link
Owner Author

commented Nov 25, 2018

status update: following works now, both directions. original posts also make it into AP/Mastodon now; see #33. not sure if discovery is fully "complete" now, but it should definitely be closer and more intuitive.

@swentel

This comment has been minimized.

Copy link
Contributor

commented Nov 25, 2018

Yes I think this is pretty much complete. As far as I understand the interaction right now, I think the docs should mention two subtle things:

  • to be discovered on the fediverse, you need to interact with it once: e.g. a like, reply or boost
  • single posts (so, no response type post) only show up when you have followers

Maybe we'll figure out a different way later, but this 'restriction' seems fine imo for now.

@snarfed

This comment has been minimized.

Copy link
Owner Author

commented Nov 25, 2018

ah, thanks for those! i'll add them too.

@snarfed snarfed closed this in 9849c8a Nov 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.