|
|
@@ -1400,6 +1400,8 @@ xs_dict *mastoapi_relationship(snac *snac, const char *md5)
|
|
|
rel = xs_dict_append(rel, "notifying", xs_stock(XSTYPE_FALSE));
|
|
|
rel = xs_dict_append(rel, "followed_by",
|
|
|
follower_check(snac, actor) ? xs_stock(XSTYPE_TRUE) : xs_stock(XSTYPE_FALSE));
|
|
|
+ rel = xs_dict_append(rel, "requested_by",
|
|
|
+ pending_check(snac, actor) ? xs_stock(XSTYPE_TRUE) : xs_stock(XSTYPE_FALSE));
|
|
|
|
|
|
rel = xs_dict_append(rel, "blocking",
|
|
|
is_muted(snac, actor) ? xs_stock(XSTYPE_TRUE) : xs_stock(XSTYPE_FALSE));
|
|
|
@@ -2116,7 +2118,19 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path,
|
|
|
}
|
|
|
else
|
|
|
if (strcmp(opt, "followers") == 0) {
|
|
|
+ xs *wing = follower_list(&snac1);
|
|
|
out = xs_list_new();
|
|
|
+ int c = 0;
|
|
|
+ const char *v;
|
|
|
+
|
|
|
+ while (xs_list_next(wing, &v, &c)) {
|
|
|
+ xs *actor = NULL;
|
|
|
+
|
|
|
+ if (valid_status(object_get(v, &actor))) {
|
|
|
+ xs *acct = mastoapi_account(NULL, actor);
|
|
|
+ out = xs_list_append(out, acct);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
if (strcmp(opt, "lists") == 0) {
|