mirror of
https://github.com/meshcore-dev/meshcore_py.git
synced 2026-06-11 11:56:18 +00:00
import contact
This commit is contained in:
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "meshcore"
|
name = "meshcore"
|
||||||
version = "1.9.8.dev4"
|
version = "1.9.8.dev5"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
{ name="Florent de Lamotte", email="florent@frizoncorrea.fr" },
|
||||||
{ name="Alex Wolden", email="awolden@gmail.com" },
|
{ name="Alex Wolden", email="awolden@gmail.com" },
|
||||||
|
|||||||
@@ -253,6 +253,10 @@ class CommandHandler:
|
|||||||
data = b"\x11"
|
data = b"\x11"
|
||||||
return await self.send(data, [EventType.CONTACT_URI, EventType.ERROR])
|
return await self.send(data, [EventType.CONTACT_URI, EventType.ERROR])
|
||||||
|
|
||||||
|
async def import_contact(self, card_data) -> Event:
|
||||||
|
data = b"\x12" + card_data
|
||||||
|
return await self.send(data, [EventType.OK, EventType.ERROR])
|
||||||
|
|
||||||
async def remove_contact(self, key: DestinationType) -> Event:
|
async def remove_contact(self, key: DestinationType) -> Event:
|
||||||
key_bytes = _validate_destination(key, prefix_length=32)
|
key_bytes = _validate_destination(key, prefix_length=32)
|
||||||
logger.debug(f"Removing contact: {key_bytes.hex()}")
|
logger.debug(f"Removing contact: {key_bytes.hex()}")
|
||||||
|
|||||||
Reference in New Issue
Block a user