diff options
| author | 2022-11-24 09:31:58 +0100 | |
|---|---|---|
| committer | 2022-11-24 09:31:58 +0100 | |
| commit | ea94a479f115b4c8f2bde96ea18448d61149a207 (patch) | |
| tree | 926bfb1b02ef6feb3b682a4fb1e266a3010469f5 /data.c | |
| parent | Added debug info for child index updates. (diff) | |
| download | snac2-ea94a479f115b4c8f2bde96ea18448d61149a207.tar.gz snac2-ea94a479f115b4c8f2bde96ea18448d61149a207.tar.xz snac2-ea94a479f115b4c8f2bde96ea18448d61149a207.zip | |
Stop dropping messages with hidden parents.
Diffstat (limited to 'data.c')
| -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 | ||