From 7ac750e740ce837cc8569c515bf2f9c2ef1e0d2b Mon Sep 17 00:00:00 2001 From: linus Date: Fri, 15 Sep 2023 16:37:57 +0200 Subject: [PATCH] Fixed faulty link restoration --- crosspost.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crosspost.py b/crosspost.py index fbe6721..a3de14a 100644 --- a/crosspost.py +++ b/crosspost.py @@ -140,7 +140,7 @@ def restoreUrls(record): text = record.text encodedText = text.encode("UTF-8") for facet in record.facets: - if facet.py_type != "app.bsky.richtext.facet#link": + if facet.features[0].py_type != "app.bsky.richtext.facet#link": continue url = facet.features[0].uri # The index section designates where a URL starts end ends. Using this we can pick out the exact