Skeleton work
This commit is contained in:
parent
6cea4269b2
commit
d4f74447ec
|
@ -38,11 +38,13 @@ exports.getModule = class ActivityPubWebHandler extends WebHandlerModule {
|
||||||
_selfUrlRequestHandler(req, resp) {
|
_selfUrlRequestHandler(req, resp) {
|
||||||
const accept = req.headers['accept'] || '*/*';
|
const accept = req.headers['accept'] || '*/*';
|
||||||
if (accept === 'application/activity+json') {
|
if (accept === 'application/activity+json') {
|
||||||
return this._selfActorHandler(req, resp);
|
return this._selfAsActorHandler(req, resp);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_selfActorHandler(req, resp) {
|
return this._standardSelfHandler(req, resp);
|
||||||
|
}
|
||||||
|
|
||||||
|
_selfAsActorHandler(req, resp) {
|
||||||
const url = new URL(req.url, `https://${req.headers.host}`);
|
const url = new URL(req.url, `https://${req.headers.host}`);
|
||||||
const accountName = url.pathname.substring(url.pathname.lastIndexOf('/') + 1);
|
const accountName = url.pathname.substring(url.pathname.lastIndexOf('/') + 1);
|
||||||
|
|
||||||
|
@ -84,6 +86,11 @@ exports.getModule = class ActivityPubWebHandler extends WebHandlerModule {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_standardSelfHandler(req, resp) {
|
||||||
|
// :TODO: this should also be their profile page?! Perhaps that should also be shared...
|
||||||
|
return this._notFound(resp);
|
||||||
|
}
|
||||||
|
|
||||||
_notFound(resp) {
|
_notFound(resp) {
|
||||||
this.webServer.respondWithError(
|
this.webServer.respondWithError(
|
||||||
resp,
|
resp,
|
||||||
|
|
Loading…
Reference in New Issue