mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 05:15:04 +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,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) {
|
||||
|
|
Loading…
Reference in a new issue