mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 13:25:04 +00:00
Use the right object id when storing Announce + Create + Note objects.
This commit is contained in:
parent
eee1916858
commit
43d2e80dc5
1 changed files with 5 additions and 3 deletions
|
@ -177,12 +177,14 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
|
||||||
if (xs_is_null(type))
|
if (xs_is_null(type))
|
||||||
type = "(null)";
|
type = "(null)";
|
||||||
|
|
||||||
srv_debug(0, xs_fmt("timeline_request type %s '%s'", *id, type));
|
srv_debug(0, xs_fmt("timeline_request type %s '%s'", nid, type));
|
||||||
|
|
||||||
if (strcmp(type, "Create") == 0) {
|
if (strcmp(type, "Create") == 0) {
|
||||||
/* some software like lemmy nest Announce + Create + Note */
|
/* some software like lemmy nest Announce + Create + Note */
|
||||||
if (!xs_is_null(object = xs_dict_get(object, "object")))
|
if (!xs_is_null(object = xs_dict_get(object, "object"))) {
|
||||||
type = xs_dict_get(object, "type");
|
type = xs_dict_get(object, "type");
|
||||||
|
nid = xs_dict_get(object, "id");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
type = "(null)";
|
type = "(null)";
|
||||||
}
|
}
|
||||||
|
@ -198,7 +200,7 @@ int timeline_request(snac *snac, char **id, xs_str **wrk, int level)
|
||||||
char *in_reply_to = xs_dict_get(object, "inReplyTo");
|
char *in_reply_to = xs_dict_get(object, "inReplyTo");
|
||||||
|
|
||||||
/* store */
|
/* store */
|
||||||
timeline_add(snac, *id, object);
|
timeline_add(snac, nid, object);
|
||||||
|
|
||||||
/* recurse! */
|
/* recurse! */
|
||||||
if (level < 32)
|
if (level < 32)
|
||||||
|
|
Loading…
Reference in a new issue