diff --git a/models/issues/reaction.go b/models/issues/reaction.go index 293dfa3fd11..28da696366e 100644 --- a/models/issues/reaction.go +++ b/models/issues/reaction.go @@ -377,7 +377,7 @@ func (list ReactionList) GetFirstUsers() string { if buffer.Len() > 0 { buffer.WriteString(", ") } - buffer.WriteString(reaction.User.DisplayName()) + buffer.WriteString(reaction.User.Name) if rem--; rem == 0 { break } diff --git a/models/issues/reaction_test.go b/models/issues/reaction_test.go index ddd0e2d04c0..e397568ac03 100644 --- a/models/issues/reaction_test.go +++ b/models/issues/reaction_test.go @@ -109,7 +109,7 @@ func TestIssueReactionCount(t *testing.T) { reactions := reactionsList.GroupByType() assert.Len(t, reactions["heart"], 4) assert.Equal(t, 2, reactions["heart"].GetMoreUserCount()) - assert.Equal(t, user1.DisplayName()+", "+user2.DisplayName(), reactions["heart"].GetFirstUsers()) + assert.Equal(t, user1.Name+", "+user2.Name, reactions["heart"].GetFirstUsers()) assert.True(t, reactions["heart"].HasUser(1)) assert.False(t, reactions["heart"].HasUser(5)) assert.False(t, reactions["heart"].HasUser(0))