mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-04 22:28:08 -06:00
[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:
parent
27bcc1fcbd
commit
fde0c6bc8c
5 changed files with 11 additions and 32 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue