Fix read acknowledgement when topic filter is set

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
Lee Smet committed 2026-03-20 13:31:56 +01:00
1 parent 988cdc37c9
commit c7e86df578
2 files changed
+10 -1

No files matched your search

+2
View File
@@ -20,6 +20,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- On unix based systems, the created key file is no longer readable system-wide.
- The message subsystem no longer removes peeked message if a topic filter is set.
- Properly send back a read acknowledgement after popping/peeking a message while
a topic filter is set.
### Deprecated
+8 -1
View File
@@ -1338,7 +1338,14 @@ where
.enumerate()
.find(|(_, v)| &v.topic == topic)
{
return inbox.complete_msges.remove(idx).unwrap();
let msg = if pop {
inbox.complete_msges.remove(idx).unwrap();
} else {
inbox.complete_msges[idx].clone();
};
self.notify_read(&msg);
return msg;
} else {
break 'check;
}