diff options
author | default <nobody@localhost> | 2022-10-01 09:12:33 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2022-10-01 09:12:33 +0200 |
commit | 2c00c7b0b585867495a505a9daf3ab48aa1dfa0b (patch) | |
tree | ba3d8f3619f80ab269a24da861ebb38c7056581d /data.c | |
parent | 1bb52559b2de8d896ad2e3a4c2fd4207c460733f (diff) |
New web action 'Unfollow'.
Diffstat (limited to 'data.c')
-rw-r--r-- | data.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -693,6 +693,27 @@ int following_check(snac *snac, char *actor) } +int following_get(snac *snac, char *actor, d_char **data) +/* returns the 'Follow' object */ +{ + xs *fn = _following_fn(snac, actor); + FILE *f; + int status = 200; + + if ((f = fopen(fn, "r")) != NULL) { + xs *j = xs_readall(f); + + fclose(f); + + *data = xs_json_loads(j); + } + else + status = 404; + + return status; +} + + d_char *_muted_fn(snac *snac, char *actor) { xs *md5 = xs_md5_hex(actor, strlen(actor)); |