fix: prevent system messages from being ignored in multi-channel search (#3875)
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Unversioned
|
## Unversioned
|
||||||
|
|
||||||
- Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694)
|
- Major: Added multi-channel searching to search dialog via keyboard shortcut. (Ctrl+Shift+F by default) (#3694, #3875)
|
||||||
- Minor: Added option to display tabs on the right and bottom. (#3847)
|
- Minor: Added option to display tabs on the right and bottom. (#3847)
|
||||||
- Minor: Added `is:first-msg` search option. (#3700)
|
- Minor: Added `is:first-msg` search option. (#3700)
|
||||||
- Minor: Added quotation marks in the permitted/blocked Automod messages for clarity. (#3654)
|
- Minor: Added quotation marks in the permitted/blocked Automod messages for clarity. (#3654)
|
||||||
|
|||||||
@@ -188,7 +188,8 @@ LimitedQueueSnapshot<MessagePtr> SearchPopup::buildSnapshot()
|
|||||||
auto uniqueIterator =
|
auto uniqueIterator =
|
||||||
std::unique(combinedSnapshot.begin(), combinedSnapshot.end(),
|
std::unique(combinedSnapshot.begin(), combinedSnapshot.end(),
|
||||||
[](MessagePtr &a, MessagePtr &b) {
|
[](MessagePtr &a, MessagePtr &b) {
|
||||||
return a->id == b->id;
|
// nullptr check prevents system messages from being dropped
|
||||||
|
return (a->id != nullptr) && a->id == b->id;
|
||||||
});
|
});
|
||||||
|
|
||||||
combinedSnapshot.erase(uniqueIterator, combinedSnapshot.end());
|
combinedSnapshot.erase(uniqueIterator, combinedSnapshot.end());
|
||||||
|
|||||||
Reference in New Issue
Block a user