summaryrefslogtreecommitdiff
path: root/internal/processing/processor.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-01-05 13:39:31 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-05 13:39:31 +0100
commitd5e3996a18ee37fc4bdf5718632d3d19ac7a8c1b (patch)
tree7b8df224893611c77cadc847c2fd8d7ec239b636 /internal/processing/processor.go
parent[bugfix] fix check for closed poll to account for non-zero closed time but in... (diff)
downloadgotosocial-d5e3996a18ee37fc4bdf5718632d3d19ac7a8c1b.tar.xz
[feature] Parse instance descriptors as markdown, show T&C on /about (#2481)
* [feature] Parse instance descriptors as markdown, show T&C on /about * lint * remove unnecessary nullzero tags
Diffstat (limited to 'internal/processing/processor.go')
-rw-r--r--internal/processing/processor.go17
1 files changed, 14 insertions, 3 deletions
diff --git a/internal/processing/processor.go b/internal/processing/processor.go
index ac930aeb2..6ac7a6bf0 100644
--- a/internal/processing/processor.go
+++ b/internal/processing/processor.go
@@ -21,6 +21,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/cleaner"
"github.com/superseriousbusiness/gotosocial/internal/email"
"github.com/superseriousbusiness/gotosocial/internal/federation"
+ "github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
mm "github.com/superseriousbusiness/gotosocial/internal/media"
"github.com/superseriousbusiness/gotosocial/internal/oauth"
"github.com/superseriousbusiness/gotosocial/internal/processing/account"
@@ -39,6 +40,7 @@ import (
"github.com/superseriousbusiness/gotosocial/internal/processing/user"
"github.com/superseriousbusiness/gotosocial/internal/processing/workers"
"github.com/superseriousbusiness/gotosocial/internal/state"
+ "github.com/superseriousbusiness/gotosocial/internal/text"
"github.com/superseriousbusiness/gotosocial/internal/typeutils"
"github.com/superseriousbusiness/gotosocial/internal/visibility"
)
@@ -56,6 +58,13 @@ type Processor struct {
state *state.State
/*
+ Required for instance description / terms updating.
+ */
+
+ formatter *text.Formatter
+ parseMentionFunc gtsmodel.ParseMentionFunc
+
+ /*
SUB-PROCESSORS
*/
@@ -147,9 +156,11 @@ func NewProcessor(
)
processor := &Processor{
- converter: converter,
- oauthServer: oauthServer,
- state: state,
+ converter: converter,
+ oauthServer: oauthServer,
+ state: state,
+ formatter: text.NewFormatter(state.DB),
+ parseMentionFunc: parseMentionFunc,
}
// Instantiate sub processors.