summaryrefslogtreecommitdiff
path: root/internal/processing/status
diff options
context:
space:
mode:
Diffstat (limited to 'internal/processing/status')
-rw-r--r--internal/processing/status/util.go6
-rw-r--r--internal/processing/status/util_test.go11
2 files changed, 8 insertions, 9 deletions
diff --git a/internal/processing/status/util.go b/internal/processing/status/util.go
index 79c416f98..52214e95f 100644
--- a/internal/processing/status/util.go
+++ b/internal/processing/status/util.go
@@ -23,11 +23,11 @@ import (
"errors"
"fmt"
- "github.com/sirupsen/logrus"
apimodel "github.com/superseriousbusiness/gotosocial/internal/api/model"
"github.com/superseriousbusiness/gotosocial/internal/db"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
"github.com/superseriousbusiness/gotosocial/internal/gtsmodel"
+ "github.com/superseriousbusiness/gotosocial/internal/log"
"github.com/superseriousbusiness/gotosocial/internal/util"
)
@@ -204,12 +204,12 @@ func (p *processor) ProcessMentions(ctx context.Context, form *apimodel.Advanced
for _, mentionedAccountName := range mentionedAccountNames {
gtsMention, err := p.parseMention(ctx, mentionedAccountName, accountID, status.ID)
if err != nil {
- logrus.Errorf("ProcessMentions: error parsing mention %s from status: %s", mentionedAccountName, err)
+ log.Errorf("ProcessMentions: error parsing mention %s from status: %s", mentionedAccountName, err)
continue
}
if err := p.db.Put(ctx, gtsMention); err != nil {
- logrus.Errorf("ProcessMentions: error putting mention in db: %s", err)
+ log.Errorf("ProcessMentions: error putting mention in db: %s", err)
}
mentions = append(mentions, gtsMention)
diff --git a/internal/processing/status/util_test.go b/internal/processing/status/util_test.go
index 80c2da897..f1b826bd0 100644
--- a/internal/processing/status/util_test.go
+++ b/internal/processing/status/util_test.go
@@ -34,8 +34,11 @@ const statusText1 = `Another test @foss_satan@fossbros-anonymous.io
#Hashtag
Text`
-const statusText1ExpectedFull = "<p>Another test <span class=\"h-card\"><a href=\"http://fossbros-anonymous.io/@foss_satan\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>foss_satan</span></a></span><br><br><a href=\"http://localhost:8080/tags/Hashtag\" class=\"mention hashtag\" rel=\"tag nofollow noreferrer noopener\" target=\"_blank\">#<span>Hashtag</span></a><br><br>Text</p>"
-const statusText1ExpectedPartial = "<p>Another test <span class=\"h-card\"><a href=\"http://fossbros-anonymous.io/@foss_satan\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>foss_satan</span></a></span><br><br>#Hashtag<br><br>Text</p>"
+
+const (
+ statusText1ExpectedFull = "<p>Another test <span class=\"h-card\"><a href=\"http://fossbros-anonymous.io/@foss_satan\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>foss_satan</span></a></span><br><br><a href=\"http://localhost:8080/tags/Hashtag\" class=\"mention hashtag\" rel=\"tag nofollow noreferrer noopener\" target=\"_blank\">#<span>Hashtag</span></a><br><br>Text</p>"
+ statusText1ExpectedPartial = "<p>Another test <span class=\"h-card\"><a href=\"http://fossbros-anonymous.io/@foss_satan\" class=\"u-url mention\" rel=\"nofollow noreferrer noopener\" target=\"_blank\">@<span>foss_satan</span></a></span><br><br>#Hashtag<br><br>Text</p>"
+)
const statusText2 = `Another test @foss_satan@fossbros-anonymous.io
@@ -97,7 +100,6 @@ func (suite *UtilTestSuite) TestProcessMentions1() {
}
func (suite *UtilTestSuite) TestProcessContentFull1() {
-
/*
TEST PREPARATION
*/
@@ -146,7 +148,6 @@ func (suite *UtilTestSuite) TestProcessContentFull1() {
}
func (suite *UtilTestSuite) TestProcessContentPartial1() {
-
/*
TEST PREPARATION
*/
@@ -238,7 +239,6 @@ func (suite *UtilTestSuite) TestProcessMentions2() {
}
func (suite *UtilTestSuite) TestProcessContentFull2() {
-
/*
TEST PREPARATION
*/
@@ -288,7 +288,6 @@ func (suite *UtilTestSuite) TestProcessContentFull2() {
}
func (suite *UtilTestSuite) TestProcessContentPartial2() {
-
/*
TEST PREPARATION
*/