Fixed faulty link restoration

This commit is contained in:
linus
2023-09-15 16:37:57 +02:00
parent 01d28265c9
commit 7ac750e740

View File

@@ -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