diff options
| -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, | |||
| 1902 | } | 1902 | } |
| 1903 | } | 1903 | } |
| 1904 | } | 1904 | } |
| 1905 | else | ||
| 1906 | if (strcmp(op, "source") == 0) { /** **/ | ||
| 1907 | out = xs_dict_new(); | ||
| 1908 | |||
| 1909 | /* get the mastoapi status id */ | ||
| 1910 | out = xs_dict_append(out, "id", xs_list_get(l, 3)); | ||
| 1911 | |||
| 1912 | out = xs_dict_append(out, "text", xs_dict_get(msg, "sourceContent")); | ||
| 1913 | out = xs_dict_append(out, "spoiler_text", xs_dict_get(msg, "summary")); | ||
| 1914 | } | ||
| 1905 | } | 1915 | } |
| 1906 | else | 1916 | else |
| 1907 | srv_debug(1, xs_fmt("mastoapi status: bad id %s", id)); | 1917 | srv_debug(1, xs_fmt("mastoapi status: bad id %s", id)); |