summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--store/sql_emoji_store.go2
-rw-r--r--store/sql_emoji_store_test.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/store/sql_emoji_store.go b/store/sql_emoji_store.go
index 5aad725f9..e2bd00e0f 100644
--- a/store/sql_emoji_store.go
+++ b/store/sql_emoji_store.go
@@ -79,7 +79,7 @@ func (es SqlEmojiStore) Get(id string, allowFromCache bool) StoreChannel {
if metrics != nil {
metrics.IncrementMemCacheHitCounter("Emoji")
}
- result.Data = cacheItem.(map[string]*model.Emoji)
+ result.Data = cacheItem.(*model.Emoji)
storeChannel <- result
close(storeChannel)
return
diff --git a/store/sql_emoji_store_test.go b/store/sql_emoji_store_test.go
index 3c05257f5..8cd3eac8c 100644
--- a/store/sql_emoji_store_test.go
+++ b/store/sql_emoji_store_test.go
@@ -84,6 +84,12 @@ func TestEmojiGet(t *testing.T) {
t.Fatalf("failed to get emoji with id %v: %v", emoji.Id, result.Err)
}
}
+
+ for _, emoji := range emojis {
+ if result := <-store.Emoji().Get(emoji.Id, true); result.Err != nil {
+ t.Fatalf("failed to get emoji with id %v: %v", emoji.Id, result.Err)
+ }
+ }
}
func TestEmojiGetByName(t *testing.T) {