summaryrefslogtreecommitdiff
path: root/internal/gtsmodel
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-01-29 15:57:22 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-29 14:57:22 +0000
commitaa8bbe6ad2e3908bd55bd6522524784cd4383ae2 (patch)
treebc1c3d742f2ef243936d4629aa0694affdbab5ca /internal/gtsmodel
parent[chore] Add a couple tests for updating list entries (#2580) (diff)
downloadgotosocial-aa8bbe6ad2e3908bd55bd6522524784cd4383ae2.tar.xz
[bugfix] Fix Postgres emoji delete, emoji category change (#2570)
* [bugfix] Fix Postgres emoji delete, emoji category change * revert trace logging * caching issue * update tests
Diffstat (limited to 'internal/gtsmodel')
-rw-r--r--internal/gtsmodel/emoji.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/internal/gtsmodel/emoji.go b/internal/gtsmodel/emoji.go
index 596a64110..b377b1440 100644
--- a/internal/gtsmodel/emoji.go
+++ b/internal/gtsmodel/emoji.go
@@ -44,3 +44,10 @@ type Emoji struct {
CategoryID string `bun:"type:CHAR(26),nullzero"` // ID of the category this emoji belongs to.
Cached *bool `bun:",nullzero,notnull,default:false"`
}
+
+// IsLocal returns true if the emoji is
+// local to this instance., ie., it did
+// not originate from a remote instance.
+func (e *Emoji) IsLocal() bool {
+ return e.Domain == ""
+}