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

Fix following from Mastodon with Authorized Fetch enabled #439

Merged
merged 4 commits into from Mar 25, 2021

Conversation

@thebaer
Copy link
Contributor

@thebaer thebaer commented Mar 8, 2021

This fixes federation with Mastodon instances that have Authorized Fetch turned on by signing the GET request to fetch the actor when a blog is first followed.

Closes T820


  • I have signed the CLA
This fixes federation with Mastodon instances that have Authorized
Fetch turned on by signing the GET request to fetch the actor when
a blog is first followed.

Ref T820
@thebaer thebaer added this to the 0.13 milestone Mar 8, 2021
thebaer added 3 commits Mar 8, 2021
This skips the silenced-user check.

Ref T820
This skips the silenced-user check.

Ref T820
@thebaer
Copy link
Contributor Author

@thebaer thebaer commented Mar 8, 2021

There were a few missing pieces, but this is ready for review now 👍

@amwelles
Copy link

@amwelles amwelles commented Mar 9, 2021

I just attempted to follow this blog: https://write.as/skepticaldruid from https://traingletoot.party, and I got the same result as before: it requests to follow, but the follow never actually goes through.

I am not sure if Authorized Fetch is turned on, but I am on Mastodon v3.3.0, and it’s all managed through https://masto.host. I’ve been looking forward to this fix, so let me know if I can help with any additional troubleshooting!

@thebaer
Copy link
Contributor Author

@thebaer thebaer commented Mar 10, 2021

Thanks for offering to help, @amwelles! Yeah, I think I'm seeing the same issue with following Write.as blogs from our Mastodon instance, https://writing.exchange (also managed through Masto.host). However, everything seems to work on our other (more seldom-used) Mastodon instance, https://m.abunchtell.com. Very strange.

I'm going to do a little more digging, and will let you know if I could use help on anything!

@aaribaud
Copy link

@aaribaud aaribaud commented Mar 11, 2021

FWIW, same issue from mastodon.art. Can help test too.

@thebaer
Copy link
Contributor Author

@thebaer thebaer commented Mar 11, 2021

Seem to have narrowed it down after noticing this issue. Can you try these steps, to see if it fixes things?

  1. On Mastodon, look up your Write.as (WriteFreely) blog and click "Cancel follow request"
  2. On the WriteFreely blog you're unable to follow, publish a new post that mentions your Mastodon account, like this.
  3. On Mastodon, look up your blog again and press "Follow"
  4. Wait a few seconds, refresh the page, and make sure the button now says "Unfollow" instead of "Cancel follow request" -- that means it worked.
@aaribaud
Copy link

@aaribaud aaribaud commented Mar 11, 2021

Step 4: the switch to "Unfollow" was immediate and I did not even have to refresh.

However, while I was notified of the post from step 2 (makes sense as I was mentioned), further posts sent after step 4 did not cause any notification, or appear on my write.as profile as seen from my Mastodon account.

Enabling or disabling notifications (right next to the Unfollow button) changes nothing.

@thebaer
Copy link
Contributor Author

@thebaer thebaer commented Mar 11, 2021

Right, Mastodon switches it to "Unfollow" immediately no matter what, so you need to refresh the page to make sure it worked. When you refresh, does it still say "Unfollow"?

@aaribaud
Copy link

@aaribaud aaribaud commented Mar 11, 2021

Nope -- Cancel follow request

This seems to contradict the hypothesis that if an instance receives a connection from write.as then it will unblock connections to write.as; I can confirm that on step 2, my mastodon.art account was indeed notified that it had been mentioned in a write.as blog post.

@amwelles
Copy link

@amwelles amwelles commented Mar 11, 2021

@thebaer I did get the mention notification, but the follow request did not go through afterward. Looks like @aaribaud is in the same boat. :)

@marcoXbresciani
Copy link

@marcoXbresciani marcoXbresciani commented Mar 18, 2021

Nope -- Cancel follow request

This seems to contradict the hypothesis that if an instance receives a connection from write.as then it will unblock connections to write.as; I can confirm that on step 2, my mastodon.art account was indeed notified that it had been mentioned in a write.as blog post.

Same behaviour of @aaribaud even for me: @AAMfP@fosstodon.org and https://write.as/marco-bresciani/

@thebaer
Copy link
Contributor Author

@thebaer thebaer commented Mar 24, 2021

@amwelles @aaribaud @marcoXbresciani, can you please try following your account again? I think I got to the bottom of this issue, which seems to only be related to our hosting environment on Write.as. I've since patched the issue, and am able to follow your accounts now.

@aaribaud
Copy link

@aaribaud aaribaud commented Mar 24, 2021

Hey, seems it works! I unfollowed the write.as account, deleted previous blogs on write.as, published a new blog post mentioning my Mastodon.art account, followed my write.as account from my Mastodon.art account, refreshed... And this time I don't get a "Cancel follow request", I get a proper "Unfollow".

@marcoXbresciani
Copy link

@marcoXbresciani marcoXbresciani commented Mar 24, 2021

@amwelles
Copy link

@amwelles amwelles commented Mar 25, 2021

Confirmed working for me as well! Thanks for all your work. 😊

@thebaer
Copy link
Contributor Author

@thebaer thebaer commented Mar 25, 2021

Great to hear! Thanks for testing this, everyone. Will get this merged.

@thebaer thebaer merged commit 85efbcc into develop Mar 25, 2021
@thebaer thebaer deleted the support-authorized-fetch branch Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants