mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-11 05:36:44 +02:00
Fix parts of issue #8221 and part of PR #4767
Is linked to https://codeberg.org/forgejo/forgejo/pulls/8274
The commit 555f6e57ad
fixes timeout forgejo/forgejo#8274 (Kommentar)
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8708
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
Co-committed-by: Michael Jerger <michael.jerger@meissa-gmbh.de>
19 lines
494 B
Go
19 lines
494 B
Go
// Copyright 2025 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package federation
|
|
|
|
import (
|
|
"context"
|
|
|
|
ap "github.com/go-ap/activitypub"
|
|
)
|
|
|
|
func ProcessRepositoryInbox(ctx context.Context, activity *ap.Activity, repositoryID int64) (ServiceResult, error) {
|
|
switch activity.Type {
|
|
case ap.LikeType:
|
|
return ProcessLikeActivity(ctx, activity, repositoryID)
|
|
default:
|
|
return ServiceResult{}, NewErrNotAcceptablef("Not a like activity: %v", activity.Type)
|
|
}
|
|
}
|