summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2025-01-09 09:10:21 +0100
committerGravatar default2025-01-09 09:10:21 +0100
commit25b22d8a94ddfd3f281e0b0c3405bf7dd6e6feac (patch)
tree9abf7a7f0587911cfd70339c6df6b13539aaf8aa /activitypub.c
parentDeleted useless check. (diff)
downloadsnac2-25b22d8a94ddfd3f281e0b0c3405bf7dd6e6feac.tar.gz
snac2-25b22d8a94ddfd3f281e0b0c3405bf7dd6e6feac.tar.xz
snac2-25b22d8a94ddfd3f281e0b0c3405bf7dd6e6feac.zip
Some fixes to receive and update 'Event' objects correctly.
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c
index 24954e6..944dd69 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -2126,14 +2126,14 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
2126 snac_log(snac, xs_fmt("new 'Question' %s %s", actor, id)); 2126 snac_log(snac, xs_fmt("new 'Question' %s %s", actor, id));
2127 } 2127 }
2128 else 2128 else
2129 if (strcmp(utype, "Video") == 0) { /** **/ 2129 if (xs_match(utype, "Audio|Video|Event")) { /** **/
2130 const char *id = xs_dict_get(object, "id"); 2130 const char *id = xs_dict_get(object, "id");
2131 2131
2132 if (xs_is_null(id)) 2132 if (xs_is_null(id))
2133 snac_log(snac, xs_fmt("malformed message: no 'id' field")); 2133 snac_log(snac, xs_fmt("malformed message: no 'id' field"));
2134 else 2134 else
2135 if (timeline_add(snac, id, object)) 2135 if (timeline_add(snac, id, object))
2136 snac_log(snac, xs_fmt("new 'Video' %s %s", actor, id)); 2136 snac_log(snac, xs_fmt("new '%s' %s %s", utype, actor, id));
2137 } 2137 }
2138 else 2138 else
2139 snac_debug(snac, 1, xs_fmt("ignored 'Create' for object type '%s'", utype)); 2139 snac_debug(snac, 1, xs_fmt("ignored 'Create' for object type '%s'", utype));
@@ -2241,7 +2241,7 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req)
2241 snac_log(snac, xs_fmt("updated actor %s", actor)); 2241 snac_log(snac, xs_fmt("updated actor %s", actor));
2242 } 2242 }
2243 else 2243 else
2244 if (xs_match(utype, "Note|Page|Article|Video")) { /** **/ 2244 if (xs_match(utype, "Note|Page|Article|Video|Audio|Event")) { /** **/
2245 const char *id = xs_dict_get(object, "id"); 2245 const char *id = xs_dict_get(object, "id");
2246 2246
2247 if (xs_is_null(id)) 2247 if (xs_is_null(id))