|
|
@@ -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
|