From 5f0cbb3e800857e1d1913fc051f42d18707bd32c Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Fri, 28 Oct 2022 16:49:04 +0300 Subject: [PATCH] Make rss/atom identifier globally unique (#21550) This field should be globally unique. [RSS reference](https://www.rssboard.org/rss-specification#ltguidgtSubelementOfLtitemgt). ### Before ```xml abc opened issue <a href="https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1">abc/defg#1</a> https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1 1#Colors #FF0000

]]>
abc 2 Mon, 17 Oct 2022 16:06:08 +0000
abc created repository <a href="https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg">abc/defg</a> https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg abc 1 Mon, 17 Oct 2022 16:05:43 +0000 ``` ### After ```xml abc opened issue <a href="https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1">abc/defg#1</a> https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1 1#Colors #FF0000

]]>
abc 2: https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg/issues/1 Mon, 17 Oct 2022 16:06:08 +0000
abc created repository <a href="https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg">abc/defg</a> https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg abc 1: https://3000-yardenshoham-gitea-3pzuhkduf6t.ws-eu72.gitpod.io/abc/defg Mon, 17 Oct 2022 16:05:43 +0000 ``` * Fixes #21542 Signed-off-by: Yarden Shoham Co-authored-by: Lauris BH --- routers/web/feed/convert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/feed/convert.go b/routers/web/feed/convert.go index 645d9370d..306ecf7d6 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, })