From e4967cfcb375d9611001e0e78be31e9c915a85b6 Mon Sep 17 00:00:00 2001 From: default Date: Wed, 28 Sep 2022 20:08:02 +0200 Subject: [PATCH] Process 'Update' + 'Person'. --- activitypub.c | 8 +++++++- data.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/activitypub.c b/activitypub.c index 82bf028..ca6bf52 100644 --- a/activitypub.c +++ b/activitypub.c @@ -669,10 +669,16 @@ void process_message(snac *snac, char *msg, char *req) else snac_log(snac, xs_fmt("error requesting 'Announce' object %s", object)); } -/* else if (strcmp(type, "Update") == 0) { + if (strcmp(utype, "Person") == 0) { + actor_add(snac, actor, xs_dict_get(msg, "object")); + snac_log(snac, xs_fmt("updated actor %s", actor)); + } + else + snac_log(snac, xs_fmt("ignored 'Update' for object type '%s'", utype)); } +/* else if (strcmp(type, "Delete") == 0) { } diff --git a/data.c b/data.c index 9b52b94..c4ade59 100644 --- a/data.c +++ b/data.c @@ -737,7 +737,7 @@ d_char *_actor_fn(snac *snac, char *actor) int actor_add(snac *snac, char *actor, char *msg) -/* adds a follower */ +/* adds an actor */ { int ret = 201; /* created */ xs *fn = _actor_fn(snac, actor);