MCPcopy Create free account
hub / github.com/bytespider/Meross / shouldEncryptMessage

Method shouldEncryptMessage

packages/lib/src/deviceManager.ts:60–70  ·  view source on GitHub ↗
(device: Device, message: Message)

Source from the content-addressed store, hash-verified

58 }
59
60 private shouldEncryptMessage(device: Device, message: Message): boolean {
61 const hasAbility = device.hasAbility(Namespace.ENCRYPT_ECDHE);
62 const excludedNamespaces = [
63 Namespace.SYSTEM_ALL,
64 Namespace.SYSTEM_FIRMWARE,
65 Namespace.SYSTEM_ABILITY,
66 Namespace.ENCRYPT_ECDHE,
67 Namespace.ENCRYPT_SUITE,
68 ];
69 return hasAbility && !excludedNamespaces.includes(message.header.namespace);
70 }
71}

Callers 2

sendMessageToDeviceMethod · 0.95

Calls 1

hasAbilityMethod · 0.45

Tested by

no test coverage detected