Fixed hide() to store the object id, not its md5.

This commit is contained in:
default 2022-11-24 12:21:54 +01:00
parent 4494fc3daf
commit 2176a91c64

9
data.c
View file

@ -1097,10 +1097,17 @@ void hide(snac *snac, const char *id)
char *p, *v;
p = chld;
while (xs_list_iter(&p, &v))
while (xs_list_iter(&p, &v)) {
xs *co = NULL;
/* resolve to get the id */
if (valid_status(object_get_by_md5(v, &co, NULL))) {
if ((v = xs_dict_get(co, "id")) != NULL)
hide(snac, v);
}
}
}
}
int is_hidden(snac *snac, const char *id)