diff options
| -rw-r--r-- | data.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -399,7 +399,7 @@ int object_add(const char *id, d_char *obj) | |||
| 399 | /* does this object has a parent? */ | 399 | /* does this object has a parent? */ |
| 400 | char *in_reply_to = xs_dict_get(obj, "inReplyTo"); | 400 | char *in_reply_to = xs_dict_get(obj, "inReplyTo"); |
| 401 | 401 | ||
| 402 | if (!xs_is_null(in_reply_to)) { | 402 | if (!xs_is_null(in_reply_to) && *in_reply_to) { |
| 403 | /* update the children index of the parent */ | 403 | /* update the children index of the parent */ |
| 404 | xs *pfn = _object_fn(in_reply_to); | 404 | xs *pfn = _object_fn(in_reply_to); |
| 405 | 405 | ||
| @@ -412,7 +412,7 @@ int object_add(const char *id, d_char *obj) | |||
| 412 | else | 412 | else |
| 413 | status = 500; | 413 | status = 500; |
| 414 | 414 | ||
| 415 | srv_debug(2, xs_fmt("object_add %s %s %d", id, fn, status)); | 415 | srv_debug(0, xs_fmt("object_add %s %s %d", id, fn, status)); |
| 416 | 416 | ||
| 417 | return status; | 417 | return status; |
| 418 | } | 418 | } |
| @@ -844,8 +844,10 @@ int timeline_add(snac *snac, char *id, char *o_msg, char *parent, char *referrer | |||
| 844 | 844 | ||
| 845 | msg = xs_dict_set(msg, "_snac", md); | 845 | msg = xs_dict_set(msg, "_snac", md); |
| 846 | 846 | ||
| 847 | if ((ret = _timeline_write(snac, id, msg, parent, referrer))) | 847 | if ((ret = _timeline_write(snac, id, msg, parent, referrer))) { |
| 848 | snac_debug(snac, 1, xs_fmt("timeline_add %s", id)); | 848 | snac_debug(snac, 1, xs_fmt("timeline_add %s", id)); |
| 849 | object_add(id, o_msg); | ||
| 850 | } | ||
| 849 | 851 | ||
| 850 | return ret; | 852 | return ret; |
| 851 | } | 853 | } |