mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-09 05:39:52 -06:00
feat(activitylog): Add FileUpdated Activity
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
5
changelog/unreleased/fileupdated-activity.md
Normal file
5
changelog/unreleased/fileupdated-activity.md
Normal file
@@ -0,0 +1,5 @@
|
||||
Enhancement: Add an Activity for FileUpdated
|
||||
|
||||
Previously FileUpdated has also triggered a FileAdded Activity
|
||||
|
||||
https://github.com/owncloud/ocis/pull/10072
|
||||
@@ -109,6 +109,9 @@ func (s *ActivitylogService) HandleGetItemActivities(w http.ResponseWriter, r *h
|
||||
continue
|
||||
case events.UploadReady:
|
||||
message = MessageResourceCreated
|
||||
if ev.IsVersion {
|
||||
message = MessageResourceUpdated
|
||||
}
|
||||
ts = utils.TSToTime(ev.Timestamp)
|
||||
vars, err = s.GetVars(ctx, WithResource(ev.FileRef, true), WithUser(ev.ExecutingUser.GetId(), ev.ExecutingUser.GetDisplayName()), WithSpace(toSpace(ev.FileRef)))
|
||||
case events.FileTouched:
|
||||
|
||||
@@ -21,6 +21,7 @@ import (
|
||||
// Translations
|
||||
var (
|
||||
MessageResourceCreated = l10n.Template("{user} added {resource} to {space}")
|
||||
MessageResourceUpdated = l10n.Template("{user} updated {resource} in {space}")
|
||||
MessageResourceTrashed = l10n.Template("{user} deleted {resource} from {space}")
|
||||
MessageResourceMoved = l10n.Template("{user} moved {resource} to {space}")
|
||||
MessageResourceRenamed = l10n.Template("{user} renamed {oldResource} to {resource}")
|
||||
|
||||
@@ -637,7 +637,7 @@ Feature: check share activity
|
||||
"required": ["message","variables"],
|
||||
"properties": {
|
||||
"message": {
|
||||
"const": "{user} added {resource} to {space}"
|
||||
"const": "{user} updated {resource} in {space}"
|
||||
},
|
||||
"variables": {
|
||||
"type": "object",
|
||||
|
||||
Reference in New Issue
Block a user