-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add featured hashtags as an ActivityPub collection #11595
Conversation
d26e2d6
to
8d91484
Compare
While from a protocol standpoint this sounds somewhat fine to me, I'm pretty sure this will break any current Mastodon instance. Indeed, Mastodon currently assume every item is either a It may be best to have different collections for this |
@ThibG Since the Mention and Hashtag objects do not have an |
Correction: Passing nil into |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
0cb5935
to
785d022
Compare
785d022
to
e2c8569
Compare
I've decided to rework this to use a separate collection after all. I do not like making up another ActivityPub vocabulary term but maybe it's for the best 🤷♂️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made a few inline comments, but none of them prevent this PR from being merged.
@@ -12,25 +12,17 @@ class ActivityPub::CollectionsController < ActivityPub::BaseController | |||
|
|||
def show | |||
expires_in 3.minutes, public: public_fetch_mode? | |||
render_with_cache json: collection_presenter, content_type: 'application/activity+json', serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter, skip_activities: true | |||
render_with_cache json: collection_presenter, content_type: 'application/activity+json', serializer: ActivityPub::CollectionSerializer, adapter: ActivityPub::Adapter |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skip_activities
doesn't do anything anymore? when have we removed it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't even find where it was used... It doesn't seem to appear anywhere else in the code.
end | ||
@items = for_signed_account { cache_collection(@account.pinned_statuses, Status) } | ||
when 'tags' | ||
@items = for_signed_account { @account.featured_tags } | ||
when 'devices' | ||
@items = @account.devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this case could use for_signed_account
too although it's not really a big deal either.
Resolve #10478
New collection
featuredTags
containingHashtag
objects.