summaryrefslogtreecommitdiff
path: root/internal/util/statustools.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/util/statustools.go')
-rw-r--r--internal/util/statustools.go17
1 files changed, 0 insertions, 17 deletions
diff --git a/internal/util/statustools.go b/internal/util/statustools.go
index 08032a8f4..b2b7fffa1 100644
--- a/internal/util/statustools.go
+++ b/internal/util/statustools.go
@@ -19,7 +19,6 @@
package util
import (
- "fmt"
"strings"
"github.com/superseriousbusiness/gotosocial/internal/regexes"
@@ -59,19 +58,3 @@ func DeriveEmojisFromText(text string) []string {
}
return UniqueStrings(emojis)
}
-
-// ExtractMentionParts extracts the username test_user and the domain example.org
-// from a mention string like @test_user@example.org.
-//
-// If nothing is matched, it will return an error.
-func ExtractMentionParts(mention string) (username, domain string, err error) {
- matches := regexes.MentionName.FindStringSubmatch(mention)
- switch len(matches) {
- case 2:
- return matches[1], "", nil
- case 3:
- return matches[1], matches[2], nil
- default:
- return "", "", fmt.Errorf("couldn't match mention %s", mention)
- }
-}