Resolve object id instead of discarding like or boost.

This commit is contained in:
default 2022-09-26 07:19:45 +02:00
parent d1a2a7438d
commit 5321295005

View file

@ -296,24 +296,22 @@ void process_message(snac *snac, char *msg, char *req)
else
*/
if (strcmp(type, "Like") == 0) {
if (xs_type(object) == XSTYPE_STRING) {
if (xs_type(object) == XSTYPE_DICT)
object = xs_dict_get(object, "id");
timeline_admire(snac, object, actor, 1);
snac_log(snac, xs_fmt("new 'Like' %s %s", actor, object));
}
else
snac_debug(snac, 2, xs_fmt("xs_type for 'Like' object not string"));
}
else
if (strcmp(type, "Announce") == 0) {
if (xs_type(object) == XSTYPE_STRING) {
if (xs_type(object) == XSTYPE_DICT)
object = xs_dict_get(object, "id");
timeline_request(snac, object);
timeline_admire(snac, object, actor, 0);
snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
}
else
snac_debug(snac, 2, xs_fmt("xs_type for 'Announce' object not string"));
}
/*
else
if (strcmp(type, "Update") == 0) {