diff options
author | default <nobody@localhost> | 2024-02-15 17:34:46 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-02-15 17:34:46 +0100 |
commit | 263e239653b79d230a7546b9db89ff71dc0f2a53 (patch) | |
tree | 7d3718fe8a7927f4ea34028e2280ae384a05142b /data.c | |
parent | 2afcb4b6ecafeb852abb2d0bb48d170b469a5a36 (diff) |
Moved verified links to its own json file.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -146,6 +146,7 @@ void user_free(snac *snac) xs_free(snac->config); xs_free(snac->config_o); xs_free(snac->key); + xs_free(snac->links); xs_free(snac->actor); xs_free(snac->md5); } @@ -233,6 +234,14 @@ int user_open(snac *user, const char *uid) } else srv_debug(2, xs_fmt("error opening '%s' %d", cfg_file, errno)); + + /* verified links */ + xs *links_file = xs_fmt("%s/links.json", user->basedir); + + if ((f = fopen(links_file, "r")) != NULL) { + user->links = xs_json_load(f); + fclose(f); + } } else srv_debug(1, xs_fmt("invalid user '%s'", uid)); |