summaryrefslogtreecommitdiff
path: root/data.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2022-11-24 12:21:54 +0100
committerdefault <nobody@localhost>2022-11-24 12:21:54 +0100
commit2176a91c64fa8ad8a79c74bbd5a38f2934c49dbe (patch)
treefad37a1f1f95ca5b153f411ef7adf2fd7f7c1df1 /data.c
parent4494fc3daf438733210ab3f20af5cd5492d60e2d (diff)
Fixed hide() to store the object id, not its md5.
Diffstat (limited to 'data.c')
-rw-r--r--data.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/data.c b/data.c
index 1cb00dd..ac4f263 100644
--- a/data.c
+++ b/data.c
@@ -1097,8 +1097,15 @@ void hide(snac *snac, const char *id)
char *p, *v;
p = chld;
- while (xs_list_iter(&p, &v))
- hide(snac, 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);
+ }
+ }
}
}