diff options
| author | 2025-01-09 18:37:12 +0100 | |
|---|---|---|
| committer | 2025-01-09 18:37:12 +0100 | |
| commit | 12fcc053b5bfd2c978ae6daf4a61922249b8e251 (patch) | |
| tree | b0c71724a87fbbaf1ffb5046faf09c4b6f44d5b5 /activitypub.c | |
| parent | Added a way to archive ignored messages. (diff) | |
| parent | Some fixes to receive and update 'Event' objects correctly. (diff) | |
| download | penes-snac2-12fcc053b5bfd2c978ae6daf4a61922249b8e251.tar.gz penes-snac2-12fcc053b5bfd2c978ae6daf4a61922249b8e251.tar.xz penes-snac2-12fcc053b5bfd2c978ae6daf4a61922249b8e251.zip | |
Merge branch 'master' of /home/angel/git/snac2
Diffstat (limited to 'activitypub.c')
| -rw-r--r-- | activitypub.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activitypub.c b/activitypub.c index 9f7e9a6..81f7708 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -2137,14 +2137,14 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req) | |||
| 2137 | snac_log(snac, xs_fmt("new 'Question' %s %s", actor, id)); | 2137 | snac_log(snac, xs_fmt("new 'Question' %s %s", actor, id)); |
| 2138 | } | 2138 | } |
| 2139 | else | 2139 | else |
| 2140 | if (strcmp(utype, "Video") == 0) { /** **/ | 2140 | if (xs_match(utype, "Audio|Video|Event")) { /** **/ |
| 2141 | const char *id = xs_dict_get(object, "id"); | 2141 | const char *id = xs_dict_get(object, "id"); |
| 2142 | 2142 | ||
| 2143 | if (xs_is_null(id)) | 2143 | if (xs_is_null(id)) |
| 2144 | snac_log(snac, xs_fmt("malformed message: no 'id' field")); | 2144 | snac_log(snac, xs_fmt("malformed message: no 'id' field")); |
| 2145 | else | 2145 | else |
| 2146 | if (timeline_add(snac, id, object)) | 2146 | if (timeline_add(snac, id, object)) |
| 2147 | snac_log(snac, xs_fmt("new 'Video' %s %s", actor, id)); | 2147 | snac_log(snac, xs_fmt("new '%s' %s %s", utype, actor, id)); |
| 2148 | } | 2148 | } |
| 2149 | else | 2149 | else |
| 2150 | snac_debug(snac, 1, xs_fmt("ignored 'Create' for object type '%s'", utype)); | 2150 | snac_debug(snac, 1, xs_fmt("ignored 'Create' for object type '%s'", utype)); |
| @@ -2252,7 +2252,7 @@ int process_input_message(snac *snac, const xs_dict *msg, const xs_dict *req) | |||
| 2252 | snac_log(snac, xs_fmt("updated actor %s", actor)); | 2252 | snac_log(snac, xs_fmt("updated actor %s", actor)); |
| 2253 | } | 2253 | } |
| 2254 | else | 2254 | else |
| 2255 | if (xs_match(utype, "Note|Page|Article|Video")) { /** **/ | 2255 | if (xs_match(utype, "Note|Page|Article|Video|Audio|Event")) { /** **/ |
| 2256 | const char *id = xs_dict_get(object, "id"); | 2256 | const char *id = xs_dict_get(object, "id"); |
| 2257 | 2257 | ||
| 2258 | if (xs_is_null(id)) | 2258 | if (xs_is_null(id)) |