chibipub

experimental activitypub node in C
git clone git://jb55.com/chibipub
Log | Files | Refs | README | LICENSE

commit d5a20d48abe0113d159e256579ff48f045b7cece
parent 70e07bd4cddf4987d015eb5b793a8a6ba23970f6
Author: William Casarin <jb55@jb55.com>
Date:   Sat,  6 Mar 2021 14:15:42 -0800

fix webfinger so that it works

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Msrc/chibipub.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/chibipub.c b/src/chibipub.c @@ -62,19 +62,20 @@ static void init_test_webfinger(struct webfinger *finger) make_cursor(buf, buf+sizeof(buf), &c); const char *host = get_hostname(); + const char *id = get_id(); assert(host); finger->acct = (char*)c.p; assert( - push_str(&c, "jb55@") && push_c_str(&c, host) + push_str(&c, "jb55@") && push_c_str(&c, id) ); finger->alias = (char*)c.p; assert( - push_str(&c, SCHEMA) && push_str(&c, host) && - push_c_str(&c, "/alias") + push_str(&c, SCHEMA) && push_str(&c, id) && + push_c_str(&c, "/") ); finger->profile_page = (char*)c.p; @@ -87,7 +88,7 @@ static void init_test_webfinger(struct webfinger *finger) finger->self = (char*)c.p; assert( - push_str(&c, SCHEMA) && push_str(&c, host) && + push_str(&c, SCHEMA) && push_str(&c, id) && push_c_str(&c, "/") ); }