mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-25 14:35:04 +00:00
Stop dropping messages with hidden parents.
This commit is contained in:
parent
6acf906b64
commit
ea94a479f1
1 changed files with 0 additions and 11 deletions
11
data.c
11
data.c
|
@ -696,22 +696,11 @@ int _timeline_write(snac *snac, char *id, char *msg, char *parent, char *referre
|
|||
|
||||
if (pfn != NULL && (f = fopen(pfn, "r")) != NULL) {
|
||||
xs *j;
|
||||
char *v;
|
||||
|
||||
j = xs_readall(f);
|
||||
fclose(f);
|
||||
|
||||
p_msg = xs_json_loads(j);
|
||||
|
||||
if ((v = xs_dict_get(p_msg, "_snac")) != NULL) {
|
||||
/* is parent hidden? */
|
||||
if ((v = xs_dict_get(v, "hidden")) && xs_type(v) == XSTYPE_TRUE) {
|
||||
snac_debug(snac, 1,
|
||||
xs_fmt("_timeline_write dropping due to hidden parent %s (%s)", id, parent));
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue