Jelajahi Sumber

Another search by URL tweak (for Pixelfed).

grunfink 1 tahun lalu
induk
melakukan
13ffca1d02
1 mengubah file dengan 8 tambahan dan 0 penghapusan
  1. 8 0
      html.c

+ 8 - 0
html.c

@@ -3795,6 +3795,14 @@ int html_get_handler(const xs_dict *req, const char *q_path,
                                     timeline_add(&snac, q, object);
                             }
                         }
+                        else {
+                            /* retry webfinger, this time with the 'official' id */
+                            const char *id = xs_dict_get(object, "id");
+
+                            if (xs_is_string(id) && valid_status(webfinger_request(id, &actor_obj, &url_acct)) &&
+                                xs_is_string(url_acct))
+                                q = url_acct;
+                        }
                     }
                 }