mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-15 01:55:03 +00:00
Resolve object id instead of discarding like or boost.
This commit is contained in:
parent
d1a2a7438d
commit
5321295005
1 changed files with 11 additions and 13 deletions
|
@ -296,23 +296,21 @@ void process_message(snac *snac, char *msg, char *req)
|
|||
else
|
||||
*/
|
||||
if (strcmp(type, "Like") == 0) {
|
||||
if (xs_type(object) == XSTYPE_STRING) {
|
||||
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"));
|
||||
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
|
||||
if (strcmp(type, "Announce") == 0) {
|
||||
if (xs_type(object) == XSTYPE_STRING) {
|
||||
timeline_request(snac, object);
|
||||
if (xs_type(object) == XSTYPE_DICT)
|
||||
object = xs_dict_get(object, "id");
|
||||
|
||||
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"));
|
||||
timeline_request(snac, object);
|
||||
|
||||
timeline_admire(snac, object, actor, 0);
|
||||
snac_log(snac, xs_fmt("new 'Announce' %s %s", actor, object));
|
||||
}
|
||||
/*
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue