From d475724cc5651a3293a40501d8c0cd722059b027 Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sat, 31 Dec 2022 18:29:53 +0000 Subject: [PATCH] Use GetIRI() instead of LoginName to fetch user IRI --- services/activitypub/activities.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/activitypub/activities.go b/services/activitypub/activities.go index ec616d9270..577c447946 100644 --- a/services/activitypub/activities.go +++ b/services/activitypub/activities.go @@ -16,8 +16,8 @@ func Follow(actorUser, followUser *user_model.User) *ap.Follow { return &ap.Follow{ Type: ap.FollowType, Actor: ap.PersonNew(ap.IRI(actorUser.GetIRI())), - Object: ap.PersonNew(ap.IRI(followUser.LoginName)), - To: ap.ItemCollection{ap.Item(ap.IRI(followUser.LoginName + "/inbox"))}, + Object: ap.PersonNew(ap.IRI(followUser.GetIRI())), + To: ap.ItemCollection{ap.Item(ap.IRI(followUser.GetIRI() + "/inbox"))}, } } @@ -27,7 +27,7 @@ func Unfollow(actorUser, followUser *user_model.User) *ap.Undo { Type: ap.UndoType, Actor: ap.PersonNew(ap.IRI(actorUser.GetIRI())), Object: Follow(actorUser, followUser), - To: ap.ItemCollection{ap.Item(ap.IRI(followUser.LoginName + "/inbox"))}, + To: ap.ItemCollection{ap.Item(ap.IRI(followUser.GetIRI() + "/inbox"))}, } }