mirror of
https://github.com/threefoldtech/mycelium.git
synced 2026-10-23 14:02:21 +00:00
Fix read acknowledgement when topic filter is set
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
This commit is contained in:
2 files changed
+10
-1
No files matched your search
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user