diff options
| -rw-r--r-- | activitypub.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c index ceb5d37..92e7c6c 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -92,15 +92,18 @@ int timeline_request(snac *snac, char **id, char *referrer) | |||
| 92 | status = activitypub_request(snac, *id, &object); | 92 | status = activitypub_request(snac, *id, &object); |
| 93 | 93 | ||
| 94 | if (valid_status(status)) { | 94 | if (valid_status(status)) { |
| 95 | char *oid = *id; | ||
| 96 | char *type = xs_dict_get(object, "type"); | 95 | char *type = xs_dict_get(object, "type"); |
| 97 | 96 | ||
| 98 | /* get the id again from the object, as it may be different */ | 97 | /* get the id again from the object, as it may be different */ |
| 99 | *id = xs_dict_get(object, "id"); | 98 | char *nid = xs_dict_get(object, "id"); |
| 100 | 99 | ||
| 101 | if (strcmp(*id, oid) != 0) | 100 | if (strcmp(nid, *id) != 0) { |
| 102 | snac_debug(snac, 1, | 101 | snac_debug(snac, 1, |
| 103 | xs_fmt("timeline_request canonical id for %s is %s", oid, *id)); | 102 | xs_fmt("timeline_request canonical id for %s is %s", *id, nid)); |
| 103 | |||
| 104 | /* FIXME: nid points inside a dynamic block */ | ||
| 105 | *id = nid; | ||
| 106 | } | ||
| 104 | 107 | ||
| 105 | if (!xs_is_null(type) && strcmp(type, "Note") == 0) { | 108 | if (!xs_is_null(type) && strcmp(type, "Note") == 0) { |
| 106 | char *actor = xs_dict_get(object, "attributedTo"); | 109 | char *actor = xs_dict_get(object, "attributedTo"); |