mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
Don't rewrite the id unless it's different.
This commit is contained in:
parent
f9f6d96579
commit
e762d942de
1 changed files with 7 additions and 4 deletions
|
@ -92,15 +92,18 @@ int timeline_request(snac *snac, char **id, char *referrer)
|
|||
status = activitypub_request(snac, *id, &object);
|
||||
|
||||
if (valid_status(status)) {
|
||||
char *oid = *id;
|
||||
char *type = xs_dict_get(object, "type");
|
||||
|
||||
/* get the id again from the object, as it may be different */
|
||||
*id = xs_dict_get(object, "id");
|
||||
char *nid = xs_dict_get(object, "id");
|
||||
|
||||
if (strcmp(*id, oid) != 0)
|
||||
if (strcmp(nid, *id) != 0) {
|
||||
snac_debug(snac, 1,
|
||||
xs_fmt("timeline_request canonical id for %s is %s", oid, *id));
|
||||
xs_fmt("timeline_request canonical id for %s is %s", *id, nid));
|
||||
|
||||
/* FIXME: nid points inside a dynamic block */
|
||||
*id = nid;
|
||||
}
|
||||
|
||||
if (!xs_is_null(type) && strcmp(type, "Note") == 0) {
|
||||
char *actor = xs_dict_get(object, "attributedTo");
|
||||
|
|
Loading…
Reference in a new issue