Use GetIRI() instead of LoginName to fetch user IRI
This commit is contained in:
parent
46e35c61ec
commit
d475724cc5
|
@ -16,8 +16,8 @@ func Follow(actorUser, followUser *user_model.User) *ap.Follow {
|
||||||
return &ap.Follow{
|
return &ap.Follow{
|
||||||
Type: ap.FollowType,
|
Type: ap.FollowType,
|
||||||
Actor: ap.PersonNew(ap.IRI(actorUser.GetIRI())),
|
Actor: ap.PersonNew(ap.IRI(actorUser.GetIRI())),
|
||||||
Object: ap.PersonNew(ap.IRI(followUser.LoginName)),
|
Object: ap.PersonNew(ap.IRI(followUser.GetIRI())),
|
||||||
To: ap.ItemCollection{ap.Item(ap.IRI(followUser.LoginName + "/inbox"))},
|
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,
|
Type: ap.UndoType,
|
||||||
Actor: ap.PersonNew(ap.IRI(actorUser.GetIRI())),
|
Actor: ap.PersonNew(ap.IRI(actorUser.GetIRI())),
|
||||||
Object: Follow(actorUser, followUser),
|
Object: Follow(actorUser, followUser),
|
||||||
To: ap.ItemCollection{ap.Item(ap.IRI(followUser.LoginName + "/inbox"))},
|
To: ap.ItemCollection{ap.Item(ap.IRI(followUser.GetIRI() + "/inbox"))},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue