aboutsummaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
authorYarden Shoham <hrsi88@gmail.com>2022-10-28 16:49:04 +0300
committerGitHub <noreply@github.com>2022-10-28 09:49:04 -0400
commit5f0cbb3e800857e1d1913fc051f42d18707bd32c (patch)
treeaf6d790228243f4abac4a9b06b87c4af2195dac9 /routers/web
parent830f5c3736346da7416ee8f68241dec1f995c899 (diff)
downloadgitea-5f0cbb3e800857e1d1913fc051f42d18707bd32c.tar.gz
gitea-5f0cbb3e800857e1d1913fc051f42d18707bd32c.zip
Make rss/atom identifier globally unique (#21550)
This field should be globally unique. [RSS reference](https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt). ### Before ```xml <item> <title>abc opened issue &lt;a href=&#34;https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1&#34;&gt;abc/defg#1&lt;/a&gt;</title> <link>https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1</link> <description>1#Colors</description> <content:encoded><![CDATA[<p><code>#FF0000<span class="color-preview" style="background-color: #FF0000"></span></code></p> ]]></content:encoded> <author>abc</author> <guid>2</guid> <pubDate>Mon, 17 Oct 2022 16:06:08 +0000</pubDate> </item> <item> <title>abc created repository &lt;a href=&#34;https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg&#34;&gt;abc/defg&lt;/a&gt;</title> <link>https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg</link> <description></description> <author>abc</author> <guid>1</guid> <pubDate>Mon, 17 Oct 2022 16:05:43 +0000</pubDate> </item> ``` ### After ```xml <item> <title>abc opened issue &lt;a href=&#34;https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1&#34;&gt;abc/defg#1&lt;/a&gt;</title> <link>https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1</link> <description>1#Colors</description> <content:encoded><![CDATA[<p><code>#FF0000<span class="color-preview" style="background-color: #FF0000"></span></code></p> ]]></content:encoded> <author>abc</author> <guid>2: https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1</guid> <pubDate>Mon, 17 Oct 2022 16:06:08 +0000</pubDate> </item> <item> <title>abc created repository &lt;a href=&#34;https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg&#34;&gt;abc/defg&lt;/a&gt;</title> <link>https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg</link> <description></description> <author>abc</author> <guid>1: https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg</guid> <pubDate>Mon, 17 Oct 2022 16:05:43 +0000</pubDate> </item> ``` * Fixes #21542 Signed-off-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/feed/convert.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/feed/convert.go b/routers/web/feed/convert.go
index 645d9370d5..306ecf7d6a 100644
--- a/routers/web/feed/convert.go
+++ b/routers/web/feed/convert.go
@@ -241,7 +241,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio
Name: act.ActUser.DisplayName(),
Email: act.ActUser.GetEmail(),
},
- Id: strconv.FormatInt(act.ID, 10),
+ Id: fmt.Sprintf("%v: %v", strconv.FormatInt(act.ID, 10), link.Href),
Created: act.CreatedUnix.AsTime(),
Content: content,
})