From 033ed7e4aa3b07656cb39934f487395b9e2bfdfa Mon Sep 17 00:00:00 2001
From: Stephen Paul Weber <singpolyma@singpolyma.net>
Date: Fri, 23 Oct 2015 19:00:08 +0000
Subject: [PATCH] Mark up link to original as a repost for repeats

http://indiewebcamp.com/repost
---
 lib/noticelistitem.php | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/lib/noticelistitem.php b/lib/noticelistitem.php
index dc171409f4..5c613df859 100644
--- a/lib/noticelistitem.php
+++ b/lib/noticelistitem.php
@@ -516,6 +516,19 @@ class NoticeListItem extends Widget
         if (!$this->notice->isLocal()) {
             $class .= ' external';
         }
+
+        try {
+            if($this->repeat) {
+                $this->out->element('a',
+                            array('href' => $this->repeat->getUrl(),
+                                  'class' => 'u-url'),
+                            '');
+                $class = str_replace('u-url', 'u-repost-of', $class);
+            }
+        } catch (InvalidUrlException $e) {
+            // no permalink available
+        }
+
         try {
             $this->out->element('a',
                         array('href' => $this->notice->getUrl(),
-- 
2.39.5