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

Alternative handling of private self-boosts #9998

Merged
merged 4 commits into from Feb 13, 2019

Conversation

Projects
None yet
2 participants
@ThibG
Copy link
Collaborator

ThibG commented Feb 9, 2019

  • Serialize the original toot when sending self-boosts over ActivityPub
  • Whenever an Announce is received with valid object from the same author, process it instead of fetching it

@ThibG ThibG force-pushed the ThibG:features/self-boost-embedded branch 5 times, most recently from 1c12537 to 064dc22 Feb 9, 2019

@ThibG ThibG force-pushed the ThibG:features/self-boost-embedded branch from 064dc22 to a665211 Feb 9, 2019

@@ -42,4 +42,8 @@ def atom_uri
def announce?
object.reblog?
end

def owned_announce?
announce? && object.account == object.proper.account

This comment has been minimized.

@Gargron

Gargron Feb 12, 2019

Member

I am thinking, probably not worth wasting traffic for public items that can be fetched? On the other hand, it does spare the traffic from fetching... But then, status are commonly already known before being boosted, so it's definitely a waste in those cases...

This comment has been minimized.

@ThibG

ThibG Feb 13, 2019

Author Collaborator

I don't know, including the toot is usually pretty cheap compared to performing an HTTPS request. I changed it to only embed private toots for now, but we may benefit from serializing it anyway in general. Indeed, in cases where the toot is not known to remote instances, it would be much cheaper to serialize it.

@Gargron Gargron merged commit 6a5307a into tootsuite:master Feb 13, 2019

11 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: check-i18n Your tests passed on CircleCI!
Details
ci/circleci: install Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: install-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.4 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.5 Your tests passed on CircleCI!
Details
ci/circleci: test-ruby2.6 Your tests passed on CircleCI!
Details
ci/circleci: test-webui Your tests passed on CircleCI!
Details
codeclimate All good!
Details

Gargron added a commit that referenced this pull request Feb 17, 2019

Gargron added a commit that referenced this pull request Feb 17, 2019

Gargron added a commit that referenced this pull request Feb 17, 2019

Gargron added a commit that referenced this pull request Feb 17, 2019

Gargron added a commit that referenced this pull request Feb 17, 2019

Alternative handling of private self-boosts (#9998)
* When self-boosting, embed original toot into Announce serialization

* Process unknown self-boosts from Announce object if it is more than an URI

* Add some self-boost specs

* Only serialize private toots in self-Announces

Gargron added a commit that referenced this pull request Feb 17, 2019

ThibG added a commit to ThibG/mastodon that referenced this pull request Feb 28, 2019

Fix serialization of boosts
The condition introduced by tootsuite#9998 was wrong, serializing boosts
that weren't self-boosts, and not serializing self-boosts.

ThibG added a commit to ThibG/mastodon that referenced this pull request Feb 28, 2019

Fix serialization of boosts
The condition introduced by tootsuite#9998 was wrong, serializing boosts
that weren't self-boosts, and not serializing self-boosts.

Gargron added a commit that referenced this pull request Feb 28, 2019

Fix serialization of boosts (#10129)
The condition introduced by #9998 was wrong, serializing boosts
that weren't self-boosts, and not serializing self-boosts.

Gargron added a commit that referenced this pull request Mar 5, 2019

Fix serialization of boosts (#10129)
The condition introduced by #9998 was wrong, serializing boosts
that weren't self-boosts, and not serializing self-boosts.

@ThibG ThibG deleted the ThibG:features/self-boost-embedded branch Mar 14, 2019

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.