mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-16389 - complement for emoji_icon issue (#11650)
This commit is contained in:
@@ -63,7 +63,6 @@ func (a *App) OverrideIconURLIfEmoji(post *model.Post) {
|
||||
return
|
||||
}
|
||||
emojiName := prop.(string)
|
||||
delete(post.Props, model.POST_PROPS_OVERRIDE_ICON_EMOJI)
|
||||
|
||||
if !*a.Config().ServiceSettings.EnablePostIconOverride || emojiName == "" {
|
||||
return
|
||||
|
||||
@@ -267,6 +267,8 @@ func TestPreparePostForClient(t *testing.T) {
|
||||
|
||||
s, _ := clientPost.Props[model.POST_PROPS_OVERRIDE_ICON_URL]
|
||||
assert.EqualValues(t, url, s)
|
||||
s, _ = clientPost.Props[model.POST_PROPS_OVERRIDE_ICON_EMOJI]
|
||||
assert.EqualValues(t, emoji, s)
|
||||
})
|
||||
|
||||
t.Run("overrides icon URL", func(t *testing.T) {
|
||||
@@ -274,6 +276,8 @@ func TestPreparePostForClient(t *testing.T) {
|
||||
|
||||
s, _ := clientPost.Props[model.POST_PROPS_OVERRIDE_ICON_URL]
|
||||
assert.EqualValues(t, overridenUrl, s)
|
||||
s, _ = clientPost.Props[model.POST_PROPS_OVERRIDE_ICON_EMOJI]
|
||||
assert.EqualValues(t, emoji, s)
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user