diff options
| author | 2023-09-15 23:18:27 +0200 | |
|---|---|---|
| committer | 2023-09-15 23:18:27 +0200 | |
| commit | 2edbb75a183d631fb77d4e9be0862116dab9190d (patch) | |
| tree | c246ec7bd8bda385dbcea52be58088143805530a | |
| parent | Backport from xs. (diff) | |
| download | snac2-2edbb75a183d631fb77d4e9be0862116dab9190d.tar.gz snac2-2edbb75a183d631fb77d4e9be0862116dab9190d.tar.xz snac2-2edbb75a183d631fb77d4e9be0862116dab9190d.zip | |
Also accept Update activities for Page and Article.
| -rw-r--r-- | activitypub.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c index 9427bf5..c43b0f4 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -1648,14 +1648,16 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) | |||
| 1648 | } | 1648 | } |
| 1649 | else | 1649 | else |
| 1650 | if (strcmp(type, "Update") == 0) { /** **/ | 1650 | if (strcmp(type, "Update") == 0) { /** **/ |
| 1651 | if (strcmp(utype, "Person") == 0 || strcmp(utype, "Service") == 0) { | 1651 | if (strcmp(utype, "Person") == 0 || strcmp(utype, "Service") == 0) { /** **/ |
| 1652 | actor_add(actor, xs_dict_get(msg, "object")); | 1652 | actor_add(actor, xs_dict_get(msg, "object")); |
| 1653 | timeline_touch(snac); | 1653 | timeline_touch(snac); |
| 1654 | 1654 | ||
| 1655 | snac_log(snac, xs_fmt("updated actor %s", actor)); | 1655 | snac_log(snac, xs_fmt("updated actor %s", actor)); |
| 1656 | } | 1656 | } |
| 1657 | else | 1657 | else |
| 1658 | if (strcmp(utype, "Note") == 0) { /** **/ | 1658 | if (strcmp(utype, "Note") == 0 || /** **/ |
| 1659 | strcmp(utype, "Page") == 0 || /** **/ | ||
| 1660 | strcmp(utype, "Article") == 0) { /** **/ | ||
| 1659 | const char *id = xs_dict_get(object, "id"); | 1661 | const char *id = xs_dict_get(object, "id"); |
| 1660 | 1662 | ||
| 1661 | object_add_ow(id, object); | 1663 | object_add_ow(id, object); |