mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
fix: don't broadcast public keys if the user is licensed (#5190)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com> Co-authored-by: Jonathan Bennett <jbennett@incomsystems.biz>
This commit is contained in:
parent
5f6e19d971
commit
28b469dbf0
@ -81,6 +81,12 @@ meshtastic_MeshPacket *NodeInfoModule::allocReply()
|
|||||||
ignoreRequest = false; // Don't ignore requests anymore
|
ignoreRequest = false; // Don't ignore requests anymore
|
||||||
meshtastic_User &u = owner;
|
meshtastic_User &u = owner;
|
||||||
|
|
||||||
|
// Strip the public key if the user is licensed
|
||||||
|
if (u.is_licensed && u.public_key.size > 0) {
|
||||||
|
u.public_key.bytes[0] = 0;
|
||||||
|
u.public_key.size = 0;
|
||||||
|
}
|
||||||
|
|
||||||
LOG_INFO("sending owner %s/%s/%s", u.id, u.long_name, u.short_name);
|
LOG_INFO("sending owner %s/%s/%s", u.id, u.long_name, u.short_name);
|
||||||
lastSentToMesh = millis();
|
lastSentToMesh = millis();
|
||||||
return allocDataProtobuf(u);
|
return allocDataProtobuf(u);
|
||||||
|
Loading…
Reference in New Issue
Block a user