summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authordefault <nobody@localhost>2023-04-22 00:51:06 +0200
committerdefault <nobody@localhost>2023-04-22 00:51:06 +0200
commit66d5acc8226ee9a2b2c047ad62b96a865894ce96 (patch)
tree7b8fc729a4f844ea3749dc650381aa51c4e4f5a5 /mastoapi.c
parent8c4850df5058a8ed758ded21876563d9c690bddd (diff)
Use static_get_meta() when preparing the attachment.
Diffstat (limited to 'mastoapi.c')
-rw-r--r--mastoapi.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mastoapi.c b/mastoapi.c
index bf28fa4..b8362b2 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1303,11 +1303,12 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
xs_str *v;
while (xs_list_iter(&p, &v)) {
- xs *l = xs_list_new();
- xs *url = xs_fmt("%s/s/%s", snac.actor, v);
+ xs *l = xs_list_new();
+ xs *url = xs_fmt("%s/s/%s", snac.actor, v);
+ xs *desc = static_get_meta(&snac, v);
l = xs_list_append(l, url);
- l = xs_list_append(l, "");
+ l = xs_list_append(l, desc);
attach_list = xs_list_append(attach_list, l);
}
@@ -1498,6 +1499,7 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path,
/* store */
static_put(&snac, id, payload + fo, fs);
+ static_put_meta(&snac, id, desc);
/* prepare a response */
xs *rsp = xs_dict_new();