diff options
author | default <nobody@localhost> | 2024-01-23 15:40:25 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-01-23 15:40:25 +0100 |
commit | f5031ede27307614a1c167575287ebb70e95e4f9 (patch) | |
tree | 942c2e6c6aa868824c720b2b6900e70b467e270b /mastoapi.c | |
parent | 5c787c1af055f52d5dea725a50f13722bd7a630c (diff) |
mastoapi: added support for status/.../source.
Diffstat (limited to 'mastoapi.c')
-rw-r--r-- | mastoapi.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -1902,6 +1902,16 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, } } } + else + if (strcmp(op, "source") == 0) { /** **/ + out = xs_dict_new(); + + /* get the mastoapi status id */ + out = xs_dict_append(out, "id", xs_list_get(l, 3)); + + out = xs_dict_append(out, "text", xs_dict_get(msg, "sourceContent")); + out = xs_dict_append(out, "spoiler_text", xs_dict_get(msg, "summary")); + } } else srv_debug(1, xs_fmt("mastoapi status: bad id %s", id)); |