diff --git a/services/user/activitypub.go b/services/user/activitypub.go index b191db8ab9..8b80a42bf7 100644 --- a/services/user/activitypub.go +++ b/services/user/activitypub.go @@ -68,8 +68,9 @@ func UnfollowUser(userID, followID int64) (err error) { object := ap.PersonNew(ap.IRI(followUser.LoginName)) follow := ap.FollowNew("", object) follow.Actor = ap.PersonNew(ap.IRI(setting.AppURL + "api/v1/activitypub/user/" + actorUser.Name)) - follow.To = ap.ItemCollection{ap.Item(ap.IRI(followUser.LoginName + "/inbox"))} unfollow := ap.UndoNew("", follow) + unfollow.Type = ap.UndoType + unfollow.To = ap.ItemCollection{ap.Item(ap.IRI(followUser.LoginName + "/inbox"))} err = activitypub.Send(actorUser, unfollow) if err != nil { return err