From 5e47a98f0e3aa9492f62c82c38ca669c1c0cc3b7 Mon Sep 17 00:00:00 2001 From: nekobit Date: Mon, 10 Oct 2022 20:00:12 +0000 Subject: [PATCH] Fix order FossilOrigin-Name: fe4a523c06fc771378f564d640bf9c40950cc43483ce25d2dba7c5554f41d081 --- src/protocol/activitypub/activitypub.cpp | 3 +-- src/protocol/activitypub/activitypub.h | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/protocol/activitypub/activitypub.cpp b/src/protocol/activitypub/activitypub.cpp index 720d892..1241b2e 100644 --- a/src/protocol/activitypub/activitypub.cpp +++ b/src/protocol/activitypub/activitypub.cpp @@ -133,8 +133,7 @@ HTTP::Response Route::ActivityPub::user(std::any& args, const HTTP::Request& req void ActivityPub::init_activitypub(HTTP::Server* server) { - // TODO Fix these, very greedy server->add_route({{HTTP::Request::Type::GET, "/user/:/inbox"}, Route::ActivityPub::user_inbox}); - server->add_route({{HTTP::Request::Type::GET, "/user/:"}, Route::ActivityPub::user}); server->add_route({{HTTP::Request::Type::GET, "/user/:/outbox"}, Route::ActivityPub::user_outbox}); + server->add_route({{HTTP::Request::Type::GET, "/user/:"}, Route::ActivityPub::user}); } diff --git a/src/protocol/activitypub/activitypub.h b/src/protocol/activitypub/activitypub.h index 624eab8..436b74a 100644 --- a/src/protocol/activitypub/activitypub.h +++ b/src/protocol/activitypub/activitypub.h @@ -18,6 +18,10 @@ #pragma once +#ifndef MODULE_WEBFINGER +#warning "You SHOULD (think: MUST) build Webfinger support if you want to build ActivityPub support. If you don't, then there wont be a way for most servers to discover users on your server. If you are simply testing ActivityPub routes, then you can ignore this message." +#endif + #include "http/httpserver.h" #include "http/response.h"