diff options
author | 2021-10-17 13:19:49 +0100 | |
---|---|---|
committer | 2021-10-17 14:19:49 +0200 | |
commit | 7e4c3fa5c7374363a28e9b0d028b6d71700607c7 (patch) | |
tree | a723ea4c9534d4bd88b09d0f287b4e8b79804a0e /internal/ap | |
parent | Follow request improvements (#282) (diff) | |
download | gotosocial-7e4c3fa5c7374363a28e9b0d028b6d71700607c7.tar.xz |
fix mention extracting when no domain exists (usually intra-instance mentions) (#272)
* fix mention extracting when no domain exists (usually when intra-instance mentions)
Signed-off-by: kim <grufwub@gmail.com>
* fix search logic to match new mention matching logic
Signed-off-by: kim <grufwub@gmail.com>
* appease the linter :p
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/ap')
-rw-r--r-- | internal/ap/extract.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/internal/ap/extract.go b/internal/ap/extract.go index 8a1d99ce9..f6ba555a8 100644 --- a/internal/ap/extract.go +++ b/internal/ap/extract.go @@ -565,13 +565,10 @@ func ExtractMention(i Mentionable) (*gtsmodel.Mention, error) { } // just make sure the mention string is valid so we can handle it properly later on... - username, domain, err := util.ExtractMentionParts(mentionString) + _, _, err = util.ExtractMentionParts(mentionString) if err != nil { return nil, err } - if username == "" || domain == "" { - return nil, errors.New("username or domain was empty") - } mention.NameString = mentionString // the href prop should be the AP URI of a user we know, eg https://example.org/users/whatever_user |