diff options
| -rw-r--r-- | data.c | 11 |
1 files changed, 0 insertions, 11 deletions
| @@ -696,22 +696,11 @@ int _timeline_write(snac *snac, char *id, char *msg, char *parent, char *referre | |||
| 696 | 696 | ||
| 697 | if (pfn != NULL && (f = fopen(pfn, "r")) != NULL) { | 697 | if (pfn != NULL && (f = fopen(pfn, "r")) != NULL) { |
| 698 | xs *j; | 698 | xs *j; |
| 699 | char *v; | ||
| 700 | 699 | ||
| 701 | j = xs_readall(f); | 700 | j = xs_readall(f); |
| 702 | fclose(f); | 701 | fclose(f); |
| 703 | 702 | ||
| 704 | p_msg = xs_json_loads(j); | 703 | p_msg = xs_json_loads(j); |
| 705 | |||
| 706 | if ((v = xs_dict_get(p_msg, "_snac")) != NULL) { | ||
| 707 | /* is parent hidden? */ | ||
| 708 | if ((v = xs_dict_get(v, "hidden")) && xs_type(v) == XSTYPE_TRUE) { | ||
| 709 | snac_debug(snac, 1, | ||
| 710 | xs_fmt("_timeline_write dropping due to hidden parent %s (%s)", id, parent)); | ||
| 711 | |||
| 712 | return 0; | ||
| 713 | } | ||
| 714 | } | ||
| 715 | } | 704 | } |
| 716 | } | 705 | } |
| 717 | 706 | ||