From ba6d15d6064be1b9c8e66cc162860ee4f4293e41 Mon Sep 17 00:00:00 2001
From: Thomas Sileo <t@a4.io>
Date: Tue, 19 Jul 2022 20:43:28 +0200
Subject: [PATCH] Fix permalink link

---
 app/templates/utils.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/templates/utils.html b/app/templates/utils.html
index 100eb36..b6f56ba 100644
--- a/app/templates/utils.html
+++ b/app/templates/utils.html
@@ -299,7 +299,7 @@
     <nav class="flexbox activity-bar">
     <ul>
         <li>
-            <div><a href="{{ object.url }}"{% if object.is_from_inbox %} rel="nofollow"{% endif %} class="object-permalink u-url u-uid">permalink</a></div>
+            <div><a href="{{ object.url or object.id }}"{% if object.is_from_inbox %} rel="nofollow"{% endif %} class="object-permalink u-url u-uid">permalink</a></div>
         </li>
         <li>
             <time class="dt-published" datetime="{{ object.ap_published_at.replace(microsecond=0).isoformat() }}" title="{{ object.ap_published_at.replace(microsecond=0).isoformat() }}">{{ object.ap_published_at | timeago }}</time>