mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 17:45:04 +00:00
mastoapi: added support for status/.../source.
This commit is contained in:
parent
5c787c1af0
commit
f5031ede27
1 changed files with 10 additions and 0 deletions
10
mastoapi.c
10
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
|
else
|
||||||
srv_debug(1, xs_fmt("mastoapi status: bad id %s", id));
|
srv_debug(1, xs_fmt("mastoapi status: bad id %s", id));
|
||||||
|
|
Loading…
Reference in a new issue