diff options
author | 2022-03-15 15:01:19 +0100 | |
---|---|---|
committer | 2022-03-15 15:01:19 +0100 | |
commit | e63b6531994adcf976d8e15c2b791682b8531e7d (patch) | |
tree | 6be094842816c978a3dda349c21ccc49ae8b4b95 /testrig/testmodels.go | |
parent | [bugfix] Fix bug where admin panel could not be accessed at `/admin` (#427) (diff) | |
download | gotosocial-e63b6531994adcf976d8e15c2b791682b8531e7d.tar.xz |
[performance] Add dereference shortcuts to avoid making http calls to self (#430)
* update transport (controller) to allow shortcuts
* go fmt
* expose underlying sig transport to allow test sigs
Diffstat (limited to 'testrig/testmodels.go')
-rw-r--r-- | testrig/testmodels.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testrig/testmodels.go b/testrig/testmodels.go index b95f5fbb6..a959bac51 100644 --- a/testrig/testmodels.go +++ b/testrig/testmodels.go @@ -1749,8 +1749,8 @@ func GetSignatureForActivity(activity pub.Activity, pubKeyID string, privkey cry panic(err) } - // trigger the delivery function, which will trigger the 'do' function of the recorder above - if err := tp.Deliver(context.Background(), bytes, destination); err != nil { + // trigger the delivery function for the underlying signature transport, which will trigger the 'do' function of the recorder above + if err := tp.SigTransport().Deliver(context.Background(), bytes, destination); err != nil { panic(err) } @@ -1781,8 +1781,8 @@ func GetSignatureForDereference(pubKeyID string, privkey crypto.PrivateKey, dest panic(err) } - // trigger the delivery function, which will trigger the 'do' function of the recorder above - if _, err := tp.Dereference(context.Background(), destination); err != nil { + // trigger the dereference function for the underlying signature transport, which will trigger the 'do' function of the recorder above + if _, err := tp.SigTransport().Dereference(context.Background(), destination); err != nil { panic(err) } |