Trying to enter PeerTube video address into a search bar, and get no results.
Possibly, it's not only about PeerTube, but other AP objects as well.
master (If you're a user, don't worry about this).The first thing that I notice in the response sent by Peertube that differs from Mastodon is the Content-Type header :
From Mastodon :
Cache-Control: max-age=180, public
Connection: keep-alive
Content-Encoding: gzip
Content-Type: application/activity+json; charset=utf-8
Date: Tue, 27 Mar 2018 08:20:11 GMT
ETag: W/"4e26466784da3cdb95ac048307c16186"
Link: <https://ltch.fr/users/adlA/updates/8107.atom>; rel="alternate"; type="application/atom+xml", <https://ltch.fr/users/adlA/statuses/99754567217115479>; rel="alternate"; type="application/activity+json"
Referrer-Policy: same-origin
Server: Mastodon
Transfer-Encoding: chunked
Vary: Accept,Accept-Encoding
X-Clacks-Overhead: GNU Natalie Nguyen
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
X-Request-Id: d20762e5-0cf9-4696-8706-0d467a0756ee
X-Robots-Tag: noindex
X-Runtime: 0.042104
X-XSS-Protection: 1; mode=block
From Peertube :
Connection: keep-alive
Content-Length: 4246
Content-Type: application/json; charset=utf-8
Date: Tue, 27 Mar 2018 08:23:04 GMT
ETag: W/"1096-tPnaScjXYLePAO7z4kr1H1Bp+N4"
Referrer-Policy: strict-origin-when-cross-origin
Server: NSA Watcher
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
X-Content-Type-Options: nosniff
X-Powered-By: Express
X-XSS-Protection: 1; mode=block
In one case the Content-Type is application/activity+json and in the other application/json
But given the body of the response, it might be only related to #6878 after all.
Yes, I think this is probably a duplicate of #6878
I fixed the content-type AP response: https://github.com/Chocobozzz/PeerTube/commit/4b8f09fa0164825fe9cb6423698c78e9c0495789
But we still have an issue because of this verification (does not accept Object with Video type): https://github.com/tootsuite/mastodon/blob/master/app/services/fetch_atom_service.rb#L47
And this case: https://github.com/tootsuite/mastodon/blob/master/app/services/resolve_url_service.rb#L22
If I replace Note by Video on these lines all work as expected with the latest PeerTube develop branch.
Most helpful comment
I fixed the content-type AP response: https://github.com/Chocobozzz/PeerTube/commit/4b8f09fa0164825fe9cb6423698c78e9c0495789
But we still have an issue because of this verification (does not accept Object with
Videotype): https://github.com/tootsuite/mastodon/blob/master/app/services/fetch_atom_service.rb#L47And this case: https://github.com/tootsuite/mastodon/blob/master/app/services/resolve_url_service.rb#L22
If I replace
NotebyVideoon these lines all work as expected with the latest PeerTube develop branch.