Peertube: user and channel federation

Created on 5 Feb 2019  路  6Comments  路  Source: Chocobozzz/PeerTube

As an instance administrator, it could be interesting to have the possibility to federate my instance to a user or a channel registered on a remote instance, instead of federating to the whole instance.

Among others user cases, my instance could be dedicated to a specific topic, and I know that some user or channel in the fediverse produces content related to this topic, so I want to share them to my instance's users.

In this way some people could even create an instance without owning any video, but simply aggregating some users and channels in the fediverse that they find interesting.

Component Type

Most helpful comment

I would also like to put my support behind this feature, it's something I very much could use on my instance. Like others have mentioned, I often want to follow a specific user/channel, rather than a whole instance. This is because my instance is very focused on one type of content, which often matches with individual users on other instances, but not the instance as a whole. Following the whole instance would introduce a number of videos that do not match with my instance.

All 6 comments

@Chocobozzz this probably would be nice to have in a v3 of PeerTube :)

For an example of an use case for this (as this is my most wished peertube feature):
The official Peertube channel of the KDE team (@[email protected]) has some great videos I would love to show on my instance. Also it would be great to add redundancy to them as some of their videos are getting a lot of views. But I am unable to do either as that would mean following peertube.mastodon.host which adds a huge amount of completly unrelated videos to my instance.

I think being able to follow remote channels without my server federating with the entire remote server is important. A friend is hosting the instance I'm on at the moment and I wouldn't want to have to host my own instance just to be able to follow people on other servers.

I kinda feel this is a pretty fundamental part of a federated network that's missing at the moment.

I also really need this and I'd love to propose a PR, but due to my lack of time, I cannot submit a contribution very soon and I would probably work on it in a sporadically.

As a first step, I use this post to study the feature, share functional consideration and link to interesting pieces of code. Please comment it and share your feedback!

Use case

As a instance administrator, I want to follow a remote user or a remote channel so I can publish their videos on my instance pages and feeds.

Terms

  • followed remote actor: remote user or channel I follow as an instance administrator
  • unwanted remote actors: remote user or channel I don't want to follow but are hosted by an instance of a followed remote actor

Acceptance Criteria

  • Videos of followed remote actors MUST be displayed among local ones in the following pages: Discorver, Trending, Most Liked and Recently Added
  • Videos of followed or unwanted remote actors MUST NOT be displayed in the following pages: Local
  • Videos of followed remote actors MUST be displayed in the search results when matching search criteria
  • Videos of followed remote actors MUST be listed in JSON, ATOM and RSS feeds
  • Videos of unwanted remote actors MUST NOT appear in any page, nor in search results, nor in feeds
  • followed remote actors can be filled in the below popup using this form: @[email protected]

image

Nice to have:

  • If a Peertube instance domain is submitted whereas it hosts an already existing followed remote actor, the subscription must failed and an error message must ask the admin to unsubscribe the followed remote actors first

    • Alternative: it accepts the domain and ignore followed remote actors

  • If a followed remote actor is submitted whereas its instance is already followed, the subscription must failed and an error message must ask the admin to unsubscribe the PeerTube instance first

    • Alternative: it accepts the followed remote actor and ignore it

Available alternatives

Plugin development

One can develop a plugin in order to fulfill the above needs. But the plugin API have some drawbacks:

  • feeds are not filterable (!!)
  • search results are only filterable client-side
  • filtering using 'filter:api.videos.list.result' implies bugs: videos are partially fetched and one cannot fetch more videos (details and STR can be provided upon request)
  • not convenient and hard to maintain while PeerTube evolves

Technical considerations

Server-side pieces of code to adapt

API

The API route handler (documentation) can be adapted in order to accept not only domains but also account identifiers:
https://github.com/Chocobozzz/PeerTube/blob/a02b93ce756d646a59cef57b5e4ff53c2bb30bec/server/controllers/api/server/follows.ts#L127-L142

Jobs

TODO

Client-side pieces of code to adapt

Labels to adapt

Validators

The popup must accept either domains OR actor identifiers (@[email protected])

https://github.com/Chocobozzz/PeerTube/blob/4f926722ea6784ea389013378fd233f59077ec8a/client/src/app/shared/shared-moderation/batch-domains-modal.component.ts

Unit tests

TODO

I would also like to put my support behind this feature, it's something I very much could use on my instance. Like others have mentioned, I often want to follow a specific user/channel, rather than a whole instance. This is because my instance is very focused on one type of content, which often matches with individual users on other instances, but not the instance as a whole. Following the whole instance would introduce a number of videos that do not match with my instance.

@spacekookie you as a user already can subscribe to channels on other instances which your instance doesn't federate yet. But the UI for it is not obvious, therefor I created a educational video to show how it's done, hope it helps: https://tube.jeena.net/videos/watch/51a189cf-3372-4f97-9ff7-b5982dce4c9e

Was this page helpful?
0 / 5 - 0 ratings

Related issues

filmaidykai picture filmaidykai  路  3Comments

ChameleonScales picture ChameleonScales  路  3Comments

roipoussiere picture roipoussiere  路  3Comments

tcitworld picture tcitworld  路  3Comments

XenonFiber picture XenonFiber  路  3Comments