From 187c8f3133417f1807f93487e39cdcaab655fc15 Mon Sep 17 00:00:00 2001 From: Roman Perekhod Date: Tue, 26 Nov 2024 13:54:34 +0100 Subject: [PATCH] Fix link activity message --- changelog/unreleased/fix-link-activity.md | 6 ++++++ services/activitylog/pkg/service/http.go | 2 +- .../apiActivities/shareActivities.feature | 18 ++++++------------ 3 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 changelog/unreleased/fix-link-activity.md diff --git a/changelog/unreleased/fix-link-activity.md b/changelog/unreleased/fix-link-activity.md new file mode 100644 index 0000000000..1d5cbe754a --- /dev/null +++ b/changelog/unreleased/fix-link-activity.md @@ -0,0 +1,6 @@ +Bugfix: Fix link activity message + +We changed the link token to display name in the activity message. + +https://github.com/owncloud/ocis/pull/10663 +https://github.com/owncloud/ocis/issues/10295 diff --git a/services/activitylog/pkg/service/http.go b/services/activitylog/pkg/service/http.go index 5e7c77c6f5..6fe5db0d30 100644 --- a/services/activitylog/pkg/service/http.go +++ b/services/activitylog/pkg/service/http.go @@ -204,7 +204,7 @@ func (s *ActivitylogService) HandleGetItemActivities(w http.ResponseWriter, r *h WithVar("resource", storagespace.FormatResourceID(ev.ItemID), ev.ResourceName), WithUser(ev.Executant, nil, nil), WithTranslation(&t, loc, "field", []string{ev.FieldUpdated}), - WithVar("token", ev.ItemID.GetOpaqueId(), ev.Token)) + WithVar("token", ev.ItemID.GetOpaqueId(), ev.DisplayName)) case events.LinkRemoved: message = MessageLinkDeleted ts = utils.TSToTime(ev.Timestamp) diff --git a/tests/acceptance/features/apiActivities/shareActivities.feature b/tests/acceptance/features/apiActivities/shareActivities.feature index c3be57082e..bcba715196 100644 --- a/tests/acceptance/features/apiActivities/shareActivities.feature +++ b/tests/acceptance/features/apiActivities/shareActivities.feature @@ -1161,8 +1161,7 @@ Feature: check share activity "pattern": "%user_id_pattern%" }, "name": { - "type": "string", - "pattern": "[a-zA-z]{15}" + "type": "string" } } }, @@ -1235,8 +1234,7 @@ Feature: check share activity "pattern": "%user_id_pattern%" }, "name": { - "type": "string", - "pattern": "[a-zA-z]{15}" + "type": "string" } } }, @@ -1309,8 +1307,7 @@ Feature: check share activity "pattern": "%user_id_pattern%" }, "name": { - "type": "string", - "pattern": "[a-zA-z]{15}" + "type": "string" } } }, @@ -1473,8 +1470,7 @@ Feature: check share activity "pattern": "%user_id_pattern%" }, "name": { - "type": "string", - "pattern": "[a-zA-z]{15}" + "type": "string" } } }, @@ -1547,8 +1543,7 @@ Feature: check share activity "pattern": "%user_id_pattern%" }, "name": { - "type": "string", - "pattern": "[a-zA-z]{15}" + "type": "string" } } }, @@ -1621,8 +1616,7 @@ Feature: check share activity "pattern": "%user_id_pattern%" }, "name": { - "type": "string", - "pattern": "[a-zA-z]{15}" + "type": "string" } } },