[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
This commit is contained in:
Vyr Cossont 2024-07-03 15:53:54 -07:00 committed by GitHub
commit fde0c6bc8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 11 additions and 32 deletions

View file

@ -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
}