diff options
author | 2024-07-03 15:53:54 -0700 | |
---|---|---|
committer | 2024-07-03 15:53:54 -0700 | |
commit | fde0c6bc8cce2d86269faf33739281a533566455 (patch) | |
tree | eede4b3eab1e9b36443c3a5afdbbc38cb106b751 /internal/gtsmodel | |
parent | [docs] Update how to enable http2 on nginx (#3066) (diff) | |
download | gotosocial-fde0c6bc8cce2d86269faf33739281a533566455.tar.xz |
[chore] Allow gtsmodel to depend on util (#3068)
Convert one free function into a gtsmodel.Emoji method so that util does not depend on gtsmodel and can be used from it in the future
Diffstat (limited to 'internal/gtsmodel')
-rw-r--r-- | internal/gtsmodel/emoji.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/gtsmodel/emoji.go b/internal/gtsmodel/emoji.go index c80e98ecb..7bf52586c 100644 --- a/internal/gtsmodel/emoji.go +++ b/internal/gtsmodel/emoji.go @@ -50,3 +50,8 @@ type Emoji struct { func (e *Emoji) IsLocal() bool { return e.Domain == "" } + +// ShortcodeDomain returns the [shortcode]@[domain] for the given emoji. +func (e *Emoji) ShortcodeDomain() string { + return e.Shortcode + "@" + e.Domain +} |