mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-04-20 22:13:49 +00:00
use lastmod to speedup contact updates
This commit is contained in:
parent
742c498a14
commit
665dea3648
3 changed files with 15 additions and 5 deletions
|
|
@ -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 = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue