commit f5031ed
default
·
2024-01-23 14:40:25 +0000 UTC
parent 5c787c1
mastoapi: added support for status/.../source.
1 files changed,
+10,
-0
+10,
-0
1@@ -1902,6 +1902,16 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
2 }
3 }
4 }
5+ else
6+ if (strcmp(op, "source") == 0) { /** **/
7+ out = xs_dict_new();
8+
9+ /* get the mastoapi status id */
10+ out = xs_dict_append(out, "id", xs_list_get(l, 3));
11+
12+ out = xs_dict_append(out, "text", xs_dict_get(msg, "sourceContent"));
13+ out = xs_dict_append(out, "spoiler_text", xs_dict_get(msg, "summary"));
14+ }
15 }
16 else
17 srv_debug(1, xs_fmt("mastoapi status: bad id %s", id));