snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit e4967cfcb375d9611001e0e78be31e9c915a85b6
parent c38cc09e4c593f4c7a53df6e289e8b6af03bd9ca
Author: default <nobody@localhost>
Date:   Wed, 28 Sep 2022 20:08:02 +0200

Process 'Update' + 'Person'.

Diffstat:
Mactivitypub.c | 8+++++++-
Mdata.c | 2+-
2 files changed, 8 insertions(+), 2 deletions(-)

diff --git 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 @@ -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);