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

Remote Comment capability #224

Closed
drequivalent opened this issue Jan 21, 2018 · 19 comments
Closed

Remote Comment capability #224

drequivalent opened this issue Jan 21, 2018 · 19 comments

Comments

@drequivalent
Copy link

drequivalent commented Jan 21, 2018

When I follow an account from Mastodon, I'm able to response only to new videos, that were uploaded since my server started federating with PeerTube.
I'd like to be able to comment on older videos, no matter if my instance is federating with PeerTube at the moment or not.


Status:

Implemented a basic form in 660d11e

@bnjbvr
Copy link
Collaborator

bnjbvr commented Jan 21, 2018

Correct me if I'm wrong, but I think ActivityPub doesn't allow you to do this in the way it works: it just emits metadata notifications for new content. For instance, you cannot get older toots on Mastodon after following somebody for the first time. (Maybe there's something to do at the standard specification level itself?)

@drequivalent
Copy link
Author

drequivalent commented Jan 21, 2018

Try to copy an URI of an old toot on an instance that does not federate with you to the search field. Mastodon will find this toot and let you respond.

@bnjbvr
Copy link
Collaborator

bnjbvr commented Jan 21, 2018

I see, makes sense.

@drequivalent
Copy link
Author

It's kinda the same mechanism as with "Remote Follow", AFAIK.

@Chocobozzz
Copy link
Owner

Chocobozzz commented Feb 28, 2018

I think this is a feature request on the Mastodon side 🤔

-> Recover old statuses through ActivityPub.

@drequivalent
Copy link
Author

drequivalent commented Feb 28, 2018

Will Mastodon implement a "Remote comment" link on Peertube pages? I don't think so.
Besides, why Mastodon? What if Pleroma or Aardwolf? Or another Peertube instance?

@Chocobozzz
Copy link
Owner

I'm sorry but I'm not sure to understand. I thought you wanted that on Mastodon, when you search a PeerTube video with its URL you have a result (which is not the case for now).

@drequivalent
Copy link
Author

That would be a poor man's version of what I wanted.

What's better is "Remote comment" link right above the comments section which then asks for your Fediverse account and then redirects you to your Mastodon or whatnot with your video's page open ready for response.

@Chocobozzz Chocobozzz reopened this Mar 2, 2018
@drequivalent
Copy link
Author

Any news on this one?

@rigelk
Copy link
Collaborator

rigelk commented Mar 26, 2018

Maybe I'm mistaken but Mastodon, for instance, only supports follow and share intents (source).

There is mastodon/mastodon#916 tracking the implementation of such a feature.
I checked quickly on other fediverse software but couldn't find the feature either.

Any idea as to how to implement despite all of that, @drequivalent ?

@leethax666
Copy link

Mastodon definitely shows me people's older posts from before I added them @bnjbvr

@ghost
Copy link

ghost commented May 26, 2018

@leethax666 only on your own instance I think

@riking
Copy link

riking commented Jun 6, 2018

@Chocobozzz I think the issue is that PeerTube is not giving JSON/XML AP responses for video links. https://github.com/tootsuite/mastodon/blob/master/app/services/fetch_atom_service.rb#L31-L32

A link such as https://peertube.cpy.re/videos/watch/da2b08d4-a242-4170-b32a-4ec8cbdca701 should have this in the HTML: <link rel=alternate type="application/atom+xml" href="..."> <link rel=alternate type="application/activity+json" href="..."> (make sure to update these links on navigation! I want to write a browser extension)

And respond to matching Accept: headers with the OStatus or ActivityPub views of the video.

This line in the router: https://github.com/Chocobozzz/PeerTube/blob/develop/server/controllers/client.ts#L19-L23 should be checking the Accept: header.

@rigelk
Copy link
Collaborator

rigelk commented Jun 6, 2018

@riking I can only answer for the dynamic addition/removal of <link> entries during the navigation. Angular doesn't deal well with it. I grit my teeth trying to write it for feed autodiscovery. Here though, solving the problem of properly formating the header to respond to requests from Mastodon would only require to modify the generated header server-side (like you said, probably along those lines).

@Chocobozzz
Copy link
Owner

Chocobozzz commented Jun 7, 2018

@riking Hello,

We give AP responses for video links: https://github.com/Chocobozzz/PeerTube/blob/develop/server/controllers/activitypub/client.ts#L44

Try

$ curl -H "Accept: application/ld+json" "https://peertube.cpy.re/videos/watch/5a6133b8-3e0c-40dc-b859-69d0540c3fe5"

For the HTML <link> you're right! I created a separate issue because as @rigelk said we are blocked by Angular.

@rigelk
Copy link
Collaborator

rigelk commented Sep 2, 2018

Now that Mastodon 2.5.0 implements remote reply/boost interactions through mastodon/mastodon#8202, at least we can redirect mastodon users to interact directly with the video.

@rigelk
Copy link
Collaborator

rigelk commented Sep 25, 2018

Implemented in 660d11e.

@rigelk rigelk closed this as completed Sep 25, 2018
@SerCom-KC
Copy link
Contributor

Consider removing

customHtml="You can either comment on the page of your instance where this video is federated with your PeerTube account, or via any ActivityPub-capable fediverse instance. For instance with Mastodon or Pleroma you can type in the search box <strong>@{{video.account.name}}@{{video.account.host}}</strong> and find back the video. Direct commenting capabilities are being worked on in <a href='https://github.com/Chocobozzz/PeerTube/issues/224'>#224</a>."></my-help>
?

@rigelk
Copy link
Collaborator

rigelk commented Sep 26, 2018

@SerCom-KC on my todo 😉 I will integrate part of its content with the modal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants