perf: only fetch emojis for filtered discussions

This commit is contained in:
Jakub F. Bortlík
2026-02-17 18:35:35 +01:00
parent 129b83bef4
commit 946b7182b0

View File

@@ -123,7 +123,7 @@ func (a discussionsListerService) ServeHTTP(w http.ResponseWriter, r *http.Reque
/* Collect IDs in order to fetch emojis */ /* Collect IDs in order to fetch emojis */
var noteIds []int64 var noteIds []int64
for _, discussion := range discussions { for _, discussion := range slices.Concat(linkedDiscussions, unlinkedDiscussions) {
for _, note := range discussion.Notes { for _, note := range discussion.Notes {
noteIds = append(noteIds, note.ID) noteIds = append(noteIds, note.ID)
} }