@@ -21,9 +21,8 @@ func userFeedCacheKey(userID int64) string {
2121 return fmt .Sprintf ("user_feed_%d" , userID )
2222}
2323
24- // GetFeeds returns actions according to the provided options
25- func GetFeeds (ctx context.Context , opts activities_model.GetFeedsOptions ) (activities_model.ActionList , int64 , error ) {
26- opts .DontCount = opts .Actor != nil && opts .RequestedUser != nil && (opts .Actor .IsAdmin || opts .Actor .ID == opts .RequestedUser .ID )
24+ func GetFeedsForDashboard (ctx context.Context , opts activities_model.GetFeedsOptions ) (activities_model.ActionList , int64 , error ) {
25+ opts .DontCount = opts .RequestedTeam == nil && opts .Date == ""
2726 results , cnt , err := activities_model .GetFeeds (ctx , opts )
2827 if err != nil {
2928 return nil , 0 , err
@@ -36,6 +35,11 @@ func GetFeeds(ctx context.Context, opts activities_model.GetFeedsOptions) (activ
3635 return results , cnt , err
3736}
3837
38+ // GetFeeds returns actions according to the provided options
39+ func GetFeeds (ctx context.Context , opts activities_model.GetFeedsOptions ) (activities_model.ActionList , int64 , error ) {
40+ return activities_model .GetFeeds (ctx , opts )
41+ }
42+
3943// notifyWatchers creates batch of actions for every watcher.
4044// It could insert duplicate actions for a repository action, like this:
4145// * Original action: UserID=1 (the real actor), ActUserID=1
0 commit comments