aboutsummaryrefslogtreecommitdiff
path: root/activitypub/util.go
diff options
context:
space:
mode:
authorFChannel <>2022-06-05 21:36:17 -0700
committerFChannel <>2022-06-19 12:53:29 -0700
commitdac4b267cab31fb3a4ce301f1bcdf364fcb541a1 (patch)
tree22852a6457e08f3ea047d2c20900db73c26e2fda /activitypub/util.go
parent3ac22385f2cb2256db718e47f5ae3c6d13353b70 (diff)
fix finger actor
Diffstat (limited to 'activitypub/util.go')
-rw-r--r--activitypub/util.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/activitypub/util.go b/activitypub/util.go
index f53d8e5..274493f 100644
--- a/activitypub/util.go
+++ b/activitypub/util.go
@@ -282,6 +282,12 @@ func GetActorByNameFromDB(name string) (Actor, error) {
return nActor, util.MakeError(err, "GetActorByNameFromDB")
}
+ nActor.PublicKey, err = GetActorPemFromDB(publicKeyPem)
+
+ if err != nil {
+ return nActor, util.MakeError(err, "GetActorFromDB")
+ }
+
if nActor.Id != "" && nActor.PublicKey.PublicKeyPem == "" {
if err := CreatePublicKeyFromPrivate(&nActor, publicKeyPem); err != nil {
return nActor, util.MakeError(err, "GetActorByNameFromDB")
@@ -345,7 +351,7 @@ func GetActorFromDB(id string) (Actor, error) {
err := config.DB.QueryRow(query, id).Scan(&nActor.Type, &nActor.Id, &nActor.Name, &nActor.PreferredUsername, &nActor.Inbox, &nActor.Outbox, &nActor.Following, &nActor.Followers, &nActor.Restricted, &nActor.Summary, &publicKeyPem)
if err != nil {
- return nActor, util.MakeError(err, "GetActorFromDB")
+ return nActor, nil
}
nActor.PublicKey, err = GetActorPemFromDB(publicKeyPem)