diff options
| author | 2023-12-06 19:59:59 +0100 | |
|---|---|---|
| committer | 2023-12-06 19:59:59 +0100 | |
| commit | ce0e782c946b9ac9d2a875ad0f15bebd3ba5c5b6 (patch) | |
| tree | 25f2b75f144e9d4f3f61b767d4953f28ef091141 | |
| parent | Started work to support shared inboxes. (diff) | |
| download | penes-snac2-ce0e782c946b9ac9d2a875ad0f15bebd3ba5c5b6.tar.gz penes-snac2-ce0e782c946b9ac9d2a875ad0f15bebd3ba5c5b6.tar.xz penes-snac2-ce0e782c946b9ac9d2a875ad0f15bebd3ba5c5b6.zip | |
Also check inside Update messages in is_msg_for_me().
| -rw-r--r-- | activitypub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 92a1026..c57458f 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -465,8 +465,8 @@ int is_msg_for_me(snac *snac, const xs_dict *c_msg) | |||
| 465 | return 0; | 465 | return 0; |
| 466 | } | 466 | } |
| 467 | 467 | ||
| 468 | /* if it's not a Create, allow */ | 468 | /* if it's not a Create or Update, allow */ |
| 469 | if (strcmp(type, "Create") != 0) | 469 | if (!xs_match(type, "Create|Update")) |
| 470 | return 1; | 470 | return 1; |
| 471 | 471 | ||
| 472 | xs_dict *msg = xs_dict_get(c_msg, "object"); | 472 | xs_dict *msg = xs_dict_get(c_msg, "object"); |
| @@ -2055,7 +2055,7 @@ void process_queue_item(xs_dict *q_item) | |||
| 2055 | if (user_open(&user, v)) { | 2055 | if (user_open(&user, v)) { |
| 2056 | xs *fn = xs_fmt("%s/queue/%s.json", user.basedir, ntid); | 2056 | xs *fn = xs_fmt("%s/queue/%s.json", user.basedir, ntid); |
| 2057 | 2057 | ||
| 2058 | srv_debug(1, xs_fmt("enqueue_input (from shared inbox) %s", fn)); | 2058 | snac_debug(&user, 1, xs_fmt("enqueue_input (from shared inbox) %s", fn)); |
| 2059 | 2059 | ||
| 2060 | if (link(tmpfn, fn) < 0) | 2060 | if (link(tmpfn, fn) < 0) |
| 2061 | srv_log(xs_fmt("link(%s, %s) error", tmpfn, fn)); | 2061 | srv_log(xs_fmt("link(%s, %s) error", tmpfn, fn)); |