summaryrefslogtreecommitdiff
path: root/internal/typeutils/converter.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2021-08-29 12:03:08 +0200
committerLibravatar GitHub <noreply@github.com>2021-08-29 12:03:08 +0200
commit53507ac2a32a785b5467b1e58d033780d8e02693 (patch)
tree1c48ac9f5fc47e65450d53d8d26d0dee30753687 /internal/typeutils/converter.go
parentReplace federating DB locks map, add a cleanup goroutine (#166) (diff)
downloadgotosocial-53507ac2a32a785b5467b1e58d033780d8e02693.tar.xz
Mention fixup (#167)
* rework mention creation a bit * rework mention creation a bit * tidy up status dereferencing * start adding tests for dereferencing * fixups * fix * review changes
Diffstat (limited to 'internal/typeutils/converter.go')
-rw-r--r--internal/typeutils/converter.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/internal/typeutils/converter.go b/internal/typeutils/converter.go
index 4af9767bc..630e48300 100644
--- a/internal/typeutils/converter.go
+++ b/internal/typeutils/converter.go
@@ -23,6 +23,7 @@ import (
"net/url"
"github.com/go-fed/activity/streams/vocab"
+ "github.com/sirupsen/logrus"
"github.com/superseriousbusiness/gotosocial/internal/ap"
"github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/cache"
@@ -179,15 +180,17 @@ type TypeConverter interface {
type converter struct {
config *config.Config
db db.DB
+ log *logrus.Logger
frontendCache cache.Cache
asCache cache.Cache
}
// NewConverter returns a new Converter
-func NewConverter(config *config.Config, db db.DB) TypeConverter {
+func NewConverter(config *config.Config, db db.DB, log *logrus.Logger) TypeConverter {
return &converter{
config: config,
db: db,
+ log: log,
frontendCache: cache.New(),
asCache: cache.New(),
}