mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
use lastmod to speedup contact updates
This commit is contained in:
@@ -68,7 +68,11 @@ class MessageReader:
|
||||
self.contacts[c["public_key"]] = c
|
||||
|
||||
elif packet_type_value == PacketType.CONTACT_END.value:
|
||||
await self.dispatcher.dispatch(Event(EventType.CONTACTS, self.contacts))
|
||||
lastmod = int.from_bytes(data[1:5], byteorder='little')
|
||||
attributes = {
|
||||
"lastmod": lastmod,
|
||||
}
|
||||
await self.dispatcher.dispatch(Event(EventType.CONTACTS, self.contacts, attributes))
|
||||
|
||||
elif packet_type_value == PacketType.SELF_INFO.value:
|
||||
self_info = {}
|
||||
|
||||
Reference in New Issue
Block a user