From f5031ede27307614a1c167575287ebb70e95e4f9 Mon Sep 17 00:00:00 2001 From: default Date: Tue, 23 Jan 2024 15:40:25 +0100 Subject: [PATCH] mastoapi: added support for status/.../source. --- mastoapi.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mastoapi.c b/mastoapi.c index 00a7e37..47075a8 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -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));